1.8 version and fnGetNodes() and bDeferRender: true
1.8 version and fnGetNodes() and bDeferRender: true
_jthomas
Posts: 75Questions: 0Answers: 0
Hi Allan,
You have already mentioned that with 1.8 and deferrender set to true , fnGetNodes() will only return a subset of rows. For e.g. I am loading 500 rows through an ajax source with pagination set to 25. fnGetNodes is returning only 25, when I call that from fnInitComplete.
What I am trying to do is to add a column( dynamically to each row to hide and show the details of a record as explained in the example mentioned in the URL
http://www.datatables.net/release-datatables/examples/api/row_details.html.
How can I go about adding that additional data in this particular case? Do we need to capture any other event and when we paginate and add the additional ? Please advise and thanks very much!!!
Regards
Joson
You have already mentioned that with 1.8 and deferrender set to true , fnGetNodes() will only return a subset of rows. For e.g. I am loading 500 rows through an ajax source with pagination set to 25. fnGetNodes is returning only 25, when I call that from fnInitComplete.
What I am trying to do is to add a column( dynamically to each row to hide and show the details of a record as explained in the example mentioned in the URL
http://www.datatables.net/release-datatables/examples/api/row_details.html.
How can I go about adding that additional data in this particular case? Do we need to capture any other event and when we paginate and add the additional ? Please advise and thanks very much!!!
Regards
Joson
This discussion has been closed.
Replies
[code]
"fnInitComplete": function() {
$('#customer tbody tr').each( function () {
this.childNodes[0].className = "center";
this.childNodes[0].innerHTML = '';
} );
}
[/code]
Allan
That worked like a gem. This is good when it is the same value for all rows. How can we do this for different values. For e.g, I have data in one column where I need to wrap it with a href link. I am doing the following which naturally does not work from the second page onwards. Thanks
[code]
"fnInitComplete": function() {
var nTds = $('td', this);
this.childNodes[1].innerHTML = '' + $(nTds[1]).text() + '';
}
[/code]
That worked like a gem. This is good when it is the same value for all rows. How can we do this for different values. For e.g, I have data in one column where I need to wrap it with a href link. I am doing the following which naturally does not work from the second page onwards. Thanks
[code]
"fnInitComplete": function() {
var nTds = $('td', this);
this.childNodes[1].innerHTML = '' + $(nTds[1]).text() + '';
}
[/code]
Allan