I would like to add a column that counts the rows, see it as a first, second, third place column and continues to how many rows there are. Is this doable and how?
for example, my table has to show 5 columns, but my database only has 4 columns, the extra one is the sum of the the first 2 columns and doesnt come from the DB itself.
Is it possible to use the fnServerData + getJSON (fnCallback) and edit the aoData to do this? how?
figure out but having problems inserting the column in the middle of the table..
im using fnRender
like this
[code]
"aoColumns": [
null,
null,
null,
null,
{ "fnRender": function ( oObj ) {
return 'test';
} } ]
[/code]
the problem is that if i insert the Render on the middle of the table i get an error and everything after it doesnt get rendered, the aaData seems fine.
Replies
for example, my table has to show 5 columns, but my database only has 4 columns, the extra one is the sum of the the first 2 columns and doesnt come from the DB itself.
Is it possible to use the fnServerData + getJSON (fnCallback) and edit the aoData to do this? how?
thanks!
im using fnRender
like this
[code]
"aoColumns": [
null,
null,
null,
null,
{ "fnRender": function ( oObj ) {
return 'test';
} } ]
[/code]
the problem is that if i insert the Render on the middle of the table i get an error and everything after it doesnt get rendered, the aaData seems fine.
http://datatables.net/forums/comments.php?DiscussionID=3072&page=1#Item_6
but still have the same problem that i can only add columns in the end of the table.