jQuery DataTable within asp.net updatepanel
jQuery DataTable within asp.net updatepanel
I have an jQuery DataTable within asp.net updatepanel. All works perfect till my update panel get updated.
[code]
// Init DataTable
function InitDataTable(){
var oTable = $('.data-table').dataTable({
"sPaginationType": "full_numbers",
"bProcessing": true,
"bStateSave": true,
});
}
[/code]
When the UpdatePanel gets updated DataTable looses it positions (padding etc) even though I am setting bStateSave to true.
Once the update panel is done I am re initiating DataTable by running InitDataTable()
[code]
// <![CDATA[
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(InitDataTable);
// ]]>
[/code]
Any suggestion on what I could do to make datatable position persist through updatepanel?
[code]
// Init DataTable
function InitDataTable(){
var oTable = $('.data-table').dataTable({
"sPaginationType": "full_numbers",
"bProcessing": true,
"bStateSave": true,
});
}
[/code]
When the UpdatePanel gets updated DataTable looses it positions (padding etc) even though I am setting bStateSave to true.
Once the update panel is done I am re initiating DataTable by running InitDataTable()
[code]
// <![CDATA[
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(InitDataTable);
// ]]>
[/code]
Any suggestion on what I could do to make datatable position persist through updatepanel?
This discussion has been closed.