Server side processing with row grouping, paging issue
Server side processing with row grouping, paging issue
Server side with row grouping, paging issue
I’m trying to implement row grouping with server side processing and I’m running into paging problem, all works great until one tries to go to another page, it works for one page and then DataTables stops working, I’m sure it’s related to the fact that I’m using an example that uses grouping without server side. Unfortunately this is beyond my knowledge. If anyone would give me some pointers on how to make that work that would be great. BTW awesome plugin and a huge time saver when it comes to data/table processing. Here is code I’m using.
Thanks
[code]
$(document).ready(function() {
$('#example').dataTable( {
"aLengthMenu": [[10, 25, 50, 100, 500, 5000], [10, 25, 50, 100, 500, 5000]],
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "server_processing2.php",
//grouping option
"fnDrawCallback": function ( oSettings ) {
if ( oSettings.aiDisplay.length == 0 )
{
return;
}
var nTrs = $('#example tbody tr');
var iColspan = nTrs[0].getElementsByTagName('td').length;
var sLastGroup = "";
for ( var i=0 ; i
I’m trying to implement row grouping with server side processing and I’m running into paging problem, all works great until one tries to go to another page, it works for one page and then DataTables stops working, I’m sure it’s related to the fact that I’m using an example that uses grouping without server side. Unfortunately this is beyond my knowledge. If anyone would give me some pointers on how to make that work that would be great. BTW awesome plugin and a huge time saver when it comes to data/table processing. Here is code I’m using.
Thanks
[code]
$(document).ready(function() {
$('#example').dataTable( {
"aLengthMenu": [[10, 25, 50, 100, 500, 5000], [10, 25, 50, 100, 500, 5000]],
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "server_processing2.php",
//grouping option
"fnDrawCallback": function ( oSettings ) {
if ( oSettings.aiDisplay.length == 0 )
{
return;
}
var nTrs = $('#example tbody tr');
var iColspan = nTrs[0].getElementsByTagName('td').length;
var sLastGroup = "";
for ( var i=0 ; i
This discussion has been closed.
Replies
oSettings.aoData[oSettings.aiDisplay[iDisplayIndex]] is undefined
var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[0];
Which point to line # 22 in the code I pasted above. Not that I know what the probem is but maybe someone knows.
Using “i” instead “iDisplayIndex” fixed the problem.
Thanks for making me think :)