how to set the cell background color baced on the cell value in jqgrid?

后端 未结 2 1808
伪装坚强ぢ
伪装坚强ぢ 2020-12-10 22:32

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 disable

2条回答
  •  星月不相逢
    2020-12-10 22:55

    You can do this in many ways: see this, this or this. Important is not only how you do this, but where. The loadComplete event handle is the good place for that.

    UPDATED: In the next version of jqGrid you will able to use new cellattr option as function in the colModel. See this demo and my original suggestion.

提交回复
热议问题