Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Setting up treeGrid to load enough data

  • Loading branch information...
commit cab6109f482bc824013c3ac51d148f3da282d33d 1 parent 0e9450c
@tonytomov authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  js/grid.treegrid.js
View
1  js/grid.treegrid.js
@@ -132,6 +132,7 @@ $.jgrid.extend({
$t.p.subGrid = false;$t.p.altRows =false;
$t.p.pgbuttons = false;$t.p.pginput = false;
$t.p.gridview = true;
+ if($t.p.rowTotal === null ) { $t.p.rowNum = 10000; }
$t.p.multiselect = false;$t.p.rowList = [];
$t.p.expColInd = 0;
pico = 'ui-icon-triangle-1-' + ($t.p.direction=="rtl" ? 'w' : 'e');

3 comments on commit cab6109

@OlegKi

I am not sure Tony, that the change will ever work, because of the line which set the default value of rowNum to 20.

Best regards
Oleg

@tonytomov
Owner

What is the problem? The setTreeGGid is called around line 2006. The real problem is if the developer want to load exactly certain number of records.
In this case this will be not possible... Will think how to overcome this, maybe the better solution is to use rowTotal parameter

@OlegKi

What I mean Tony is that the current implementation of Tree Grid does not support data paging. In the case the default setting of rowNum to 20 are very misunderstanding. If the user not set the value explicitly to some large enough value the default value 20 for rowNum will be applied. In the case the loaded tree data will be just cut somewhere in the middle without any warnings or errors. Look at the demo and compare it with the another demo where the rowNum will be explicitly set.

I suggest to use the code $t.p.rowNum = 10000; without any condition till one implements the paging in the tree grid code.

Best regards
Oleg

Please sign in to comment.
Something went wrong with that request. Please try again.