Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by SFGolfer on Jun 16, 2009 17:19
open dhtmlx forum
Grid paging not functioning properly

I have paging enabled (true,15,null,"pagingArea",true) and the records per page drop down is 5, 15, 25, 35, 45, 55.

The paging works correctly when 5, 15, 25 is selected. However,the paging malfunctions when any value above 25 is selected.

For example,

select 25 and the first page will CORRECTLY read and display "Records from 1 to 25". The second page will CORRECTLY read and display "Records from 26 to 50".

select 35 and the first page will read and display "Records from 1 to 26". The second page will read and display "Records from 36 to 61".

select 45 and the first page will read and display "Records from 1 to 26". The second page will read and display "Records from 46 to 71".

select 55 and the first page will read and display "Records from 1 to 26". The second page will read and display "Records from 56 to 81".


Note that selecting 25 and lower does work. Anything higher and it malfunctions.

Can you give me some troubleshooting hints?
Answer posted by dhxSupport on Jun 17, 2009 02:00
What version of dhtmlxGrid do you use? What paging skin do you use? Could you please send us any kind of sample where we can reproduce this issue? (You can send such example directly to the support@dhtml.com)
Answer posted on Jun 17, 2009 04:57
I am using the toolbar paging skin.  The bricks skin functions properly.
Answer posted by Support on Jun 17, 2009 08:45
You need to comment next line in your code
       >>mygrid.enableDistributedParsing(true,25,250);
because of distributed parsing, paging toolbar updated too early , while not all rows on current page rendered, which result in incorrect message. 
Answer posted by SFGolfer on Jun 17, 2009 11:58

I discovered the issue is with the 'record-per-portion' parameter in...

mygrid.enableDistributedParsing(true/false,record-per-portion,delay-time);

If the parameter is LOWER than the maximum number of pages shown in the Rows per Page drop down in the toolbar, then the records shown will equal the parameter plus one.

In other words, if the parameter is set to 25 and the user selects 35 in the toolbar, then the records shown (on page 1) will be 26.

So the workaround is to be sure that the maximum value in toolbar drop down does not exceed the parameter set in DistributedParsing.  I found this could be set by editing dhtmlxgrid_pgn.js and look for this line:

for (var k=10; k<60; k+=10)

Answer posted by dhxSupport on Jun 18, 2009 02:51
enableDistributedParsing() and enablePaging() methods are mutually exclusive. Paging mode increase loading perfomance itself. There is no any sence to use it with enableDistributedParsing()