I’m using jqgrid. I need to set background color of the cell based on the values.
I have tried using the following code after reload the table the color is disabled.
jQuery(“#list”).setCell
(‘5′,’5′,’t’,{background:’#ff0000′});
I want to set the cell background color on table loading, based on the cell values.
how to do this?
Thanks in advance.
You can do this in many ways: see this, this or this. Important is not only how you do this, but where. The
loadCompleteevent handle is the good place for that.UPDATED: In the next version of jqGrid you will able to use new
cellattroption as function in thecolModel. See this demo and my original suggestion.