issue with fnStateSave tableProperty
issue with fnStateSave tableProperty
vam
Posts: 5Questions: 0Answers: 0
Hi,
Am facing problem with fnStateSave property .
In My table Grid there is 60+column and when am trying to get the table property using fnStateSave it reset all the filter and return default table property.
But when am trying to do the same with less number of column it work fine. its return table properties with all filter and sort.
for reference
[code]
var tableProperty;
$('#biReportTable').dataTable({
"bDestroy" : true,
"bStateSave" : true,
"bDeferRender" : true,
"bSortClasses" : false,
"sScrollX" : "100%",
"bLengthChange" : false,
"iDisplayLength" : 100,
"sDom" : 'Tlfrtip',
"oTableTools" : {
"aButtons" : ["copy", "csv", "xls", "print"],
"sSwfPath" : "/includes/dataTables/extras/TableTools/media/swf/copy_csv_xls.swf"
},
"fnStateSave" : function (oSettings, oData) {
tableProperty = JSON.stringify(oData);
}
});
[/code]
So how can i resolve this issue. Please help to do this.
Thanks in advance
Am facing problem with fnStateSave property .
In My table Grid there is 60+column and when am trying to get the table property using fnStateSave it reset all the filter and return default table property.
But when am trying to do the same with less number of column it work fine. its return table properties with all filter and sort.
for reference
[code]
var tableProperty;
$('#biReportTable').dataTable({
"bDestroy" : true,
"bStateSave" : true,
"bDeferRender" : true,
"bSortClasses" : false,
"sScrollX" : "100%",
"bLengthChange" : false,
"iDisplayLength" : 100,
"sDom" : 'Tlfrtip',
"oTableTools" : {
"aButtons" : ["copy", "csv", "xls", "print"],
"sSwfPath" : "/includes/dataTables/extras/TableTools/media/swf/copy_csv_xls.swf"
},
"fnStateSave" : function (oSettings, oData) {
tableProperty = JSON.stringify(oData);
}
});
[/code]
So how can i resolve this issue. Please help to do this.
Thanks in advance
This discussion has been closed.
Replies
Allan
Thanks for your valuable response.
I have add this
[code]
"fnStateLoad" : function (oSettings) {
if (typeof tableProperty != 'undefined') {
console.log(tableProperty);
return tableProperty;
} else {
return false;
}
}
[/code]
But still no luck.
It depend on number of column in dataTable? Because its working fine with few number of column.
Thanks
Can you link me to a page showing the problem please?
Allan
Thanks