MVC DataTables return DT_RowClass Serverside process

MVC DataTables return DT_RowClass Serverside process

mkurleymkurley Posts: 2Questions: 0Answers: 0
edited November 2012 in General
Having a little trouble returning the "DT_RowClass" from a serverside Ajax class. I want that class applied to all of the rows in the datatable. Here is my code that is in the controller that returns the Json. I tried numerous way to return the "DT_RowClass". Can anyone take a quick look at the code below? Thanks in advance for the help.


var result = from msg in messages
select new[] {
msg.messageId
msg.From,
msg.To,
msg.Subject,
msg.Content
};

return Json(new
{
sEcho = param.sEcho,
iTotalRecords = list.Count(),
iTotalDisplayRecords = fMessage.Count(),
aaData = result
}, JsonRequestBehavior.AllowGet);

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    I don't actually see `DT_RowClass` anywhere in that code? There is an example of how it could work here: http://datatables.net/release-datatables/examples/server_side/ids.html

    Allan
This discussion has been closed.