fnReloadAjax and bStandingRedraw
fnReloadAjax and bStandingRedraw
blueshirts27
Posts: 4Questions: 0Answers: 0
After reading the following thread I got the impression that I could call the fnReloadAjax plugin method with a third parameter of bStandingRedraw equal to true in order to preserve the table state.
http://datatables.net/forums/discussion/8598/keep-pagination-state-on-fnreloadajax/p1
This didn't work for me, the table was reloaded though the page state was lost. I am using server side processing. I took a look at the fnReloadAjax plugin code and I noticed the following block at the beginning of the method.
[code]
// Server-side processing should just call fnDraw
if ( oSettings.oFeatures.bServerSide ) {
this.fnDraw();
return;
}
[/code]
Seems that when you are using server side processing it will never get to the block of code that references the bStandingRedraw parameter later in the method. Is bStandingRedraw a valid parameter for use with server side processing? I commented out the code block referenced above as a test and the table does seem to reload and retain it's state.
[code]
if ( bStandingRedraw === true )
{
oSettings._iDisplayStart = iStart;
that.oApi._fnCalculateEnd( oSettings );
that.fnDraw( false );
}
[/code]
I apologize if I am missing something though the bStandingRedraw doesn't seem to have any affect in my case.
http://datatables.net/forums/discussion/8598/keep-pagination-state-on-fnreloadajax/p1
This didn't work for me, the table was reloaded though the page state was lost. I am using server side processing. I took a look at the fnReloadAjax plugin code and I noticed the following block at the beginning of the method.
[code]
// Server-side processing should just call fnDraw
if ( oSettings.oFeatures.bServerSide ) {
this.fnDraw();
return;
}
[/code]
Seems that when you are using server side processing it will never get to the block of code that references the bStandingRedraw parameter later in the method. Is bStandingRedraw a valid parameter for use with server side processing? I commented out the code block referenced above as a test and the table does seem to reload and retain it's state.
[code]
if ( bStandingRedraw === true )
{
oSettings._iDisplayStart = iStart;
that.oApi._fnCalculateEnd( oSettings );
that.fnDraw( false );
}
[/code]
I apologize if I am missing something though the bStandingRedraw doesn't seem to have any affect in my case.
This discussion has been closed.
Replies
Allan