Skip to navigation
A way to set a jqgrid background color row.
12.07.24
# Define a class in your CSS ```css .redlight { background-color: #e9ced5; } .greenlight { background-color: #ccffcc; } ``` # In your Grid Init function, add a callback to gridComplete ``` gridComplete: function(){ let ids = jQuery("#grid").getDataIDs(); for (let i = 0; i < ids.length; i++) { let data = $("#grid").getRowData(ids[i]); if(data.exit == "O") { jQuery("#"+ids[i]).addClass("redlight"); } if(data.exit == "I") { jQuery("#"+ids[i]).addClass("greenlight"); } } }, ```
https://www.programmerall.com/article/1970911726/
Reply
Anonymous
Information Epoch 1730248196
Think parallel.
Home
Notebook
Contact us