Below table developed in the jQuery DataTable Need to add label for Status based on the condition if status "0" then "Inactivate" and for "1" - Active.
Have you investigated fnRowCallback
?
http://datatables.net/usage/callbacks#fnRowCallback
If you look at the example on the DataTables site, and play with the jsbin example, it sure seems to be what you're looking for...
"render": function (data, type, row) {
if (data == "Y") {
data = "Approved"
}
else
{
data = "Pending"
}
return data
},
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.