Add new row after each row in fnRowCallback
Add new row after each row in fnRowCallback
Hi,
I'm trying to achieve the following look using dataTables:
http://img717.imageshack.us/img717/6609/33521381.png
So the idea is you click the purple button and a row expands/collapses. I've already got the table populating minus the extra row that needs to appear.
The data is coming from a json source, my initial thinking was to try the following:
[code]
'fnRowCallback': function (nRow, aData) {
var $td = $('').html(aData[5]),
$tr = $('').append($td);
$(nRow).after($tr);
});
[/code]
However this doesn't work. Does anyone have any ideas how I might achieve this?
Thanks
I'm trying to achieve the following look using dataTables:
http://img717.imageshack.us/img717/6609/33521381.png
So the idea is you click the purple button and a row expands/collapses. I've already got the table populating minus the extra row that needs to appear.
The data is coming from a json source, my initial thinking was to try the following:
[code]
'fnRowCallback': function (nRow, aData) {
var $td = $('').html(aData[5]),
$tr = $('').append($td);
$(nRow).after($tr);
});
[/code]
However this doesn't work. Does anyone have any ideas how I might achieve this?
Thanks
This discussion has been closed.
Replies
Allan