I’m a designer with somewhat modest / limited JavaScript skills who is evaluating JQWidgets as a tool for prototyping design ideas. I’m mainly interested in using the grid control to bind CSV data. I’m evaluating both JQWidgets and Kendo UI. Yesterday I put together a prototype that sets the background color of grid rows based on the value of one of a Status column. Based on some suggestions I found in this forum, I leveraged the ‘cellclassname’ property to define a function that adds one of three classes to each cell in a row based on the Status column value. That works great, but breaks when I apply a group to the grid.
This is the function code I was using for setting the background color:
function cellclass(row, columnfield, value){
var rowid = $(‘#jqxgrid’).jqxGrid(‘getrowid’, row);
var data = $(‘#jqxgrid’).jqxGrid(‘getrowdatabyid’, rowid);
if (data.Status == ‘Complete’){
return ‘complete’;
} else if (data.Status == ‘In Progress’){
return ‘in-progress’;
} else {
return ‘scheduled’;
}
}
Is there an easy way to apply a background color to rows based on Status, that will also work with grouping? I’ve been looking for a solution for about four hours; I found a working example in Kendo Ui in less than a half hour.