zeitlin / jquery-datatables-row-grouping

Automatically exported from code.google.com/p/jquery-datatables-row-grouping
0 stars 0 forks source link

The plugin doesn't work if used with pagination and server-side loading #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use the datatables with row grouping, pagination and server-side loading;
2. Have at least 2 pages;
3. Remember the pages are being loaded by server, i.e. only the visible rows 
per the current page are in loaded in the client.
3. If you group based on some column and go to 2nd page, then you get following 
JS error from row grouping:
Error: oSettings.aoData[oSettings.aiDisplay[iDisplayIndex]] is undefined
Source File:
https://our-path-to-your-plugin/jquery.dataTables.rowGrouping.js
Line: 232

4. The problem is that iDisplay index refers to the 1st row in the 2nd page, 
e.g. 10, but row plugin uses this to retrieve the row data from the data 
structure, but because of server-side loading, there are only 10 rows loaded 
(for the page), thus there is no row in the memory with index 10.
The row plugin should not use the iDisplayIndex in case of server-side, but it 
should start from index 0, when examining the row data.

What is the expected output? What do you see instead?
The expected output is the rendered page.

What version of the product are you using? On what operating system?
The file says it's 1.1 version, operating system is irrelevant (reproducible 
all the time).

Please provide any additional information below.
The fix should check whether the server side is used and examine the row data 
starting from index 0, and ending with the last row in the page.

Original issue reported on code.google.com by peter.za...@gmail.com on 20 Dec 2011 at 6:01

GoogleCodeExporter commented 9 years ago
See also this thread:
http://datatables.net/forums/discussion/907/strange-firebug-alert-ff-after-chang
e-pagination-in-row-grouping/p1

Original comment by peter.za...@gmail.com on 20 Dec 2011 at 6:11

GoogleCodeExporter commented 9 years ago

Original comment by joc...@gmail.com on 11 Feb 2012 at 3:09

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r28.

Original comment by joc...@gmail.com on 11 Feb 2012 at 6:29

GoogleCodeExporter commented 9 years ago
Hi,

You are right. Could you please take a look at the 
http://jquery-datatables-row-grouping.googlecode.com/svn/trunk/serverSideJSONP-o
bjects.html where I have used server side processing with object data source 
and it works now. Here is used JSONP call because server-side processing page 
is on Allans datatables site, and I do not have php hosting on google code. 

You will need to take the latest version of plugin because there is fix for 
this bug.

Thanks,
Jovan

Original comment by joc...@gmail.com on 11 Feb 2012 at 6:35