I am using JQuery Data Table plugin to show a list of students in a class. The data source of the plug in is set as a server side action, which will return a json object which contains these properties (FirstName, LastName, Age, Sex,….). Our requirement has recently changed to show an image (male /female) based on the student sex.
I can either load all data, format the table way I want and then convert it to DataTable, but this is not possible because we have lot of records and we are using pagination.
Is there any functions available in data table plugin that will do post-rendering ?
Best Answer
Use mRender option
Code from the datatables docs
Link to working example here
EDIT: Another way to achieve this is to use "fnRowCallback" as pointed out by Daniel. Use this link :)
Cheers!!