0

I am using Jqgrid plugin to represent the xml data fetched from DB. I am representing 5 columns out of say 8 columns fetched from DB. Based on one of the column value, I want to represent the row with distinctive colors. for e.g, if i represent employee data like employee no, first name, last name, joined date, status(working or left), i want all the employees currently employed in one color say 'white' and those who left in 'grey'.

Please let me know if this can be done through custom formatter? i am not able get the values through rowObject, options.

Is there a way to style for a row based on column value.

thanks in advance

mayank
  • 21
  • 1

1 Answers1

0

how are you, there is a way but is not with rowOptions, is all jQuery.

 $('#(GridID)').find('tr td[aria-describedby="(GridID)_(ColumnIndex)"]').each(function(ind,val){ 
//Do stuffs, an example:
$(this).text()=="Client 1"?$(this).css('background','Red'):$(this).css('background','Blue')});

if you wanna try open this

http://jsfiddle.net/5USLz/

Good Luck!