Author Topic: Adding column with indicator icos  (Read 1440 times)

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
Adding column with indicator icos
« on: July 29, 2021, 08:38:24 pm »
Do you have any example on how to create a column that can contain 0 to many indicator icons, based on the row's data?

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
Re: Adding column with indicator icons
« Reply #1 on: July 30, 2021, 06:47:24 pm »
I updated the Subject line to "icons"

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Adding column with indicator icos
« Reply #2 on: July 31, 2021, 01:59:44 pm »
Please use column.render callback

Code: [Select]
render: function(ui){
  var rd = ui.rowData;
  if ( condition based on rd ){
    //return html for rendering icons / images.
  }
}

mikep

  • Pro Ultimate
  • Full Member
  • *
  • Posts: 163
    • View Profile
Re: Adding column with indicator icons
« Reply #3 on: August 04, 2021, 12:44:03 am »
-What is syntax to add an icon to a column?
-Do I need to create a column for each icon? If not, how do I show/hide each icon in a single column?
« Last Edit: August 04, 2021, 12:45:38 am by mikep »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Adding column with indicator icos
« Reply #4 on: August 04, 2021, 09:40:03 am »
Any no of icons can be displayed in a single column.

Code: [Select]
<img src='path to icon1'/>
<img src='path to icon2'/>
...