Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Why does rowNum get overwritten to 10000?
24/01/2013
15:36
Avatar
kpturner
Member
Members
Forum Posts: 4
Member Since:
24/01/2013
sp_UserOfflineSmall Offline

Hello, I am using 4.3.3.  If I specify "treeGrid":true then no matter what I set rowNum to, it gets overwritten to 10000 unless I also specify rowTotal.  Is this correct?   For my server, rowTotal is irrelevant.

Here is the code in grid.treegrid.js

setTreeGrid : function() {
        return this.each(function (){
            var $t = this, i=0, pico, ecol = false, nm, key, tkey, dupcols=[];
            if(!$t.p.treeGrid) {return;}
            if(!$t.p.treedatatype ) {$.extend($t.p,{treedatatype: $t.p.datatype});}
            $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; } <<<<<<<HERE  

24/01/2013
16:08
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

TreeGrid don't supports paging so all node at one should be displayed by tree grid (see limitations in the documentation). Don't forget, that only expanded nodes will be displayed in the grid so the full number of all items of the TreeGrid could be many more as the number of items displayed. If the user clicks on the icon on the side of the node to expend it jqGrid will make new request to the server. The server should returns all subitems of the expanded node.

If rowNum would not be changed to 10000 and it would be for example 10 instead than jqGrid would display only the first 10 nodes and will discard all other nodes.

Regards
Oleg 

24/01/2013
16:18
Avatar
kpturner
Member
Members
Forum Posts: 4
Member Since:
24/01/2013
sp_UserOfflineSmall Offline

Thanks for the reply.  I think that my requirement is much more simple. 

I want to load a top level grid with pagination.  If the user expands a row, then I want the children of that row to be loaded in full (and it will only be nested to one level).

For example, I might have 10000 accounts in the database, but my grid should only load accounts 10 at a time, and I want to be able to page through them. Very rarely, the user may expand the account to see sub-accounts (there may be only ever be a few of these).

I can do this very easily with the other simple grids in my application, but I want to be able to replace these with jqGrid.  At the moment, I can't.

Is there a different method I should use?

24/01/2013
16:31
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

You are welcome!

At the first look TreeGrid is wrong choice for your requirements. Probably grid with subgrids is what you really need? You will display 10 accounts in the grid having pagination. I would recommend you to add searching toolbar to the grid. If you just add subGrid: true option to the account grid the column with "+" will be add and if the user click on the icon you can create any custom information below the expended row. Typically one creates subgrid with some kind of details inside of subGridRowExpanded.

I recomend you additionally to read the answer which could be helpful in your case.

Regards
Oleg 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
48 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information