I have below table , on button click i want to change the background color of rows where OrderType is 'Special'.
"tblOrder">
Id Name Order Type 1 Gupta Traders Special 2 Shrikant Steel General 3 Payal Furniture Special
| Id | Name | Order Type |
|---|---|---|
| 1 | Gupta Traders | Special |
| 2 | Shrikant Steel | General |
| 3 | Payal Furniture | Special |
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sachin SinghPosted Nov 4, 2020, 8:16 AM
Siddharth GajbhiyePosted Jan 12, 2021, 5:07 AM
Ankit KanojiaPosted Jan 6, 2021, 7:26 AM
fnRowCallbackinbuilt event which does the same, like it will automatically change the background color of row basde on value of cell. And i guess its very easy and less coded pre-defined function of Datatable. For more details you can refer - https://stackoverflow.com/questions/25186921/change-row-background-color-based-on-cell-value-datatable