0

How to add cell-red class to 'pesel' column in row?

{ name: 'pesel', index: 'pesel', width: 220, sortable: true, resizable: false},
{ name: 'differentpesel', index: 'differentpesel', hidden: true,  width: 100, sortable: true } 

                ],
               (...)
                afterInsertRow: function (rowid, rowdata, rowelem) {                  

                    if (rowdata.differentpesel == true) {
                       $('#' + rowid).children('td').addClass('cell-red');
                    }
                }
mihal
  • 1
  • 1

1 Answers1

0

One should use cellattr instead of afterInsertRow. It allows to add conditionally class or style attribute on some cells of specific column. See here or here for more details.

Oleg
  • 220,925
  • 34
  • 403
  • 798