Adhikar Patil

Adhikar Patil

  • NA
  • 481
  • 122.4k

How to Give Color to jqgrid row Based on Conditions

Jan 26 2019 5:09 AM
Hello,
           Please tell me i have an jqgrid which shows data but based on condition i want to apply css for that specific row in jqgrid.
           here is my code in gridComplete i have wrriten following code
                     
var ids = $(this).jqGrid("getDataIDs"), l = ids.length, i, rowid, status;
for (i = 0; i < l; i++) {
rowid = ids[i];
ParentElementNo = $(this).jqGrid("getCell", rowid, "ParentElementNo");
if (ParentElementNo === "0")
{
$('#ElementsGrid').jqGrid('setRowData', rowid, false, { color: 'blue', weightfont: 'bold', align: 'right' });
}
else
{
}
 
Please tell me how to change font size, font weight as well as align.
 

Answers (1)