
jquery-datatables-row-grouping - issue #17
The plugin doesn't work if used with pagination and server-side loading
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
- 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.
Comment #1
Posted on Dec 20, 2011 by Helpful LionSee also this thread: http://datatables.net/forums/discussion/907/strange-firebug-alert-ff-after-change-pagination-in-row-grouping/p1
Comment #2
Posted on Feb 11, 2012 by Happy Panda(No comment was entered for this change.)
Comment #3
Posted on Feb 11, 2012 by Happy PandaThis issue was closed by revision r28.
Comment #4
Posted on Feb 11, 2012 by Happy PandaHi,
You are right. Could you please take a look at the http://jquery-datatables-row-grouping.googlecode.com/svn/trunk/serverSideJSONP-objects.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
Status: Fixed
Labels:
Type-Defect
Priority-High