I know it\'s been asked before, but I cant get it to run and I\'m out of things to try.
I want to colorize a row in a Grid if its value is not 1 - I use a custom for
I've tried solutions above, but I think that one is the correct:
afterInsertRow : function(rowid, rowdata)
{
if (parseFloat(rowdata.amount) > 500)
{
$(this).jqGrid('setRowData', rowid, false, {color:'red'});
}
}
If css class is between apostrophes, then it is overwritten by to the original one (you can see that easily using firebug):
correct with {color:'red'}:
According to documentation of setRowData:
If the cssprop parameter is string we use addClass to add classes to the row. If the parameter is object we use css to add css properties.
- 热议问题