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');
                    }
                }

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.