jquery data table row details and fnReloadAjax()

jquery data table row details and fnReloadAjax()

vasaganvasagan Posts: 5Questions: 0Answers: 0
edited February 2013 in General
Jquery data table has supporting expand row details about particular record.It is working for default loading.Once used nReloadAjax to reload a grid.Then try to expand a row. Row not expanding for details. advice me.
[code]$(document).ready(function() {
oTable = $('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "scripts/details_col.php",
"aoColumns": [
{ "sClass": "center", "bSortable": false },
null,
null,
null,
{ "sClass": "center" },
{ "sClass": "center" },
{ "sClass": "center" },
{ "sClass": "center" },
{ "sClass": "center" }
],
"aaSorting": [[1, 'asc']]
} );

$('#example tbody td').live( 'click', function () {
var nTr = $(this).parents('tr')[0];
if ( oTable.fnIsOpen(nTr) )
{
/* This row is already open - close it */
this.src = "../examples_support/details_open.png";
oTable.fnClose( nTr );
}
else
{
/* Open this row */
this.src = "../examples_support/details_close.png";
console.log("load");
oTable.fnOpen( nTr, fnFormatDetails(nTr), 'details' );

}
} );
function reload() {

oTable.fnReloadAjax();
}
[/code]

Replies

  • girishmrgirishmr Posts: 137Questions: 0Answers: 0
    edited February 2013
    This is by no means a solution to your problem but wanted to point out some information.

    Have you referenced the reloading via ajax plugin correctly. Having said that since you are using server side processing, even if you use the fnReloadAjax plugin, it just redraws the table. Instead you can just use
    [code]
    oTable.fnDraw(true); // Need not specify 'true' as this is 'default'
    [/code]
This discussion has been closed.