ServerSide Proc, ColReorder, Col Filtering, ColVis, State Saving combined together
ServerSide Proc, ColReorder, Col Filtering, ColVis, State Saving combined together
Hello there,
I'm trying to implement a dataTable object in my webapp with all the features listed in the subject:
ServerSide Processing (Oracle),
ColReorder,
Individual Column Filtering,
ColVis,
State Saving
At moment I got a problem to let colReorder and and Column Filtering after column reordering. That's because searche paramenter are sent with colum index instead column name:
[code]
sSearch_0
sSearch_1
sSearch_2 30004
sSearch_3
sSearch_4
sSearch_5
[/code]
Moreover in serverside php script (xhr.php example found here), the columns are managed statically with column index so after changing order in table columns index of rendered table and php doesn't match anymore. For data I resolve the problem with mData:
[code]
$(document).ready( function () {
var oTable = $('#example').dataTable( {
"bServerSide": true,
"sAjaxSource": "xhr.php",
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sScrollX": "100%",
"bScrollCollapse": true,
"bJQueryUI": true,
"bSortClasses": false,
"aaSorting": [[ 0, "desc" ]],
"bFilter": true,
"iDisplayLength": 25,
/*"sDom": '<"H"Cfr>t<"F"ip>', */
"sDom": 'R<"H"lfr>t<"F"ip>',
"aoColumns": [
{ "mData": "FILENAME" },
{ "mData": "ID_" },
{ "mData": "TMSP_INSERT" },
{ "mData": "STATUS" },
{ "mData": "TMSP_UPDATE" },
{ "mData": "MTIME" }
]
} );
[/code]
But how can I fix filtering (and ordering as well)? I haven't found any example online. Can someone please give me an advice?
Thanks in advance
I'm trying to implement a dataTable object in my webapp with all the features listed in the subject:
ServerSide Processing (Oracle),
ColReorder,
Individual Column Filtering,
ColVis,
State Saving
At moment I got a problem to let colReorder and and Column Filtering after column reordering. That's because searche paramenter are sent with colum index instead column name:
[code]
sSearch_0
sSearch_1
sSearch_2 30004
sSearch_3
sSearch_4
sSearch_5
[/code]
Moreover in serverside php script (xhr.php example found here), the columns are managed statically with column index so after changing order in table columns index of rendered table and php doesn't match anymore. For data I resolve the problem with mData:
[code]
$(document).ready( function () {
var oTable = $('#example').dataTable( {
"bServerSide": true,
"sAjaxSource": "xhr.php",
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sScrollX": "100%",
"bScrollCollapse": true,
"bJQueryUI": true,
"bSortClasses": false,
"aaSorting": [[ 0, "desc" ]],
"bFilter": true,
"iDisplayLength": 25,
/*"sDom": '<"H"Cfr>t<"F"ip>', */
"sDom": 'R<"H"lfr>t<"F"ip>',
"aoColumns": [
{ "mData": "FILENAME" },
{ "mData": "ID_" },
{ "mData": "TMSP_INSERT" },
{ "mData": "STATUS" },
{ "mData": "TMSP_UPDATE" },
{ "mData": "MTIME" }
]
} );
[/code]
But how can I fix filtering (and ordering as well)? I haven't found any example online. Can someone please give me an advice?
Thanks in advance
This discussion has been closed.
Replies