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_Related Related Topics sp_TopicIcon
jqgrid treegrid problem displaying chidlren
02/09/2010
11:20
Avatar
onsetrese
Member
Members
Forum Posts: 3
Member Since:
02/09/2010
sp_UserOfflineSmall Offline

First of all, kudos to jqgrid! Great work, very usefull tool...

Ok, unto the problem I have.

I have a treegrid using adjacency model.

I got everything working, except that, when you click a parent to expand, the data gets inserted below the row next to the parent. I hope I said the right. Let me give a quick sample, say I have

1

2

3

4

5

as top level nodes. When a I click "2", the data/children gets inserted below "3", not between "2" and "3". See below

1

2

3

     2a

     2b

     2c

4

5

The leveling is also correct. Same thing happens to the childrens chidlren. They get inserted 1 row below where it should be.  I checked the data being sent back and it thus have a correct parent id. Here is another interesting thing happening. When I click the table headers, it sorts as expected and yeah, everything falls in the right place. The children of "2" gets properly placed beneth it after sorting.

Anyone else experince this? How to fix?

03/09/2010
23:37
Avatar
aalex675
New Member
Members
Forum Posts: 1
Member Since:
03/09/2010
sp_UserOfflineSmall Offline

Just wanted to chime in and say that I have the exact same issue. Does anyone know how to resolve this issue?

27/09/2010
20:59
Avatar
donnazhen
Member
Members
Forum Posts: 5
Member Since:
10/09/2010
sp_UserOfflineSmall Offline

Yes, I have the same problem. After changing the function 'addJSONData' in grid.base.js, this issue will be gone. The following is what I've modified. Hope it can help you.

original code:

$(ts.rows[i+fpos+rcnt]).after(row);

changed to:

      if (ts.p.treeANode == -1)
          $(ts.rows[i+fpos+rcnt]).after(row);
      else
          $(ts.rows[i + fpos + rcnt]).before(row);

30/09/2010
13:39
Avatar
Evengard
New Member
Members
Forum Posts: 1
Member Since:
30/09/2010
sp_UserOfflineSmall Offline

donnazhen said:

Yes, I have the same problem. After changing the function 'addJSONData' in grid.base.js, this issue will be gone. The following is what I've modified. Hope it can help you.

original code:

$(ts.rows[i+fpos+rcnt]).after(row);

changed to:

      if (ts.p.treeANode == -1)
          $(ts.rows[i+fpos+rcnt]).after(row);
      else
          $(ts.rows[i + fpos + rcnt]).before(row);


If you dont want problem with expanding last node, then this code is better:

      if (ts.p.treeANode == -1)
          $(ts.rows[i+fpos+rcnt]).after(row);
      else 
          $(ts.rows[i + fpos + rcnt-1]).after(row);

Is it normal that we have to hack component to work with it?

Is this a problem only for adjacency model?

01/10/2010
11:54
Avatar
onsetrese
Member
Members
Forum Posts: 3
Member Since:
02/09/2010
sp_UserOfflineSmall Offline

Thanks guys, I recently updated to jqgrid3.8 full and hoping the problem was fixed with that release only to get dissappointed. Well anyway, this fixes the issue, thanks for sharing.Before,  I implemented the treegrid so that it loads all data at once and it was annoying, it takes time to load.

05/10/2010
11:01
Avatar
sprint20092010
New Member
Members
Forum Posts: 1
Member Since:
05/10/2010
sp_UserOfflineSmall Offline

It is named Christian Louboutin for the reason that man who create Christian Louboutin shoes. At the same time, it's helpful to reduce the risk of injury for the player. If you think your feet should be protected well during the strenuous exercise, the Christian Louboutin Pumps are the right choice for you.
There are many Cheap Christian Louboutin Heels from our shop. If you want to learn more informations of those Christian Louboutin Boots, please visite our website http://www.louboutinshopsale.com/. Are you looking for a comfortable shoes? We are ready for you to give you great discount Christian Louboutin Sandals and best service.

20/10/2010
19:14
Avatar
borovikpe
New Member
Members
Forum Posts: 2
Member Since:
20/10/2010
sp_UserOfflineSmall Offline

Unfortunately, your advice didn't help for me, children nodes are still inserted incorrectly. Could you please share full working jqGrid package (I mean with your patches), so I could test it for my project?

Thanks in advance.

21/10/2010
04:23
Avatar
onsetrese
Member
Members
Forum Posts: 3
Member Since:
02/09/2010
sp_UserOfflineSmall Offline

Hi borovikpe,

I have jqgrid3.8 full and applied donnazhen patch... that sure work just fine...

21/10/2010
11:38
Avatar
borovikpe
New Member
Members
Forum Posts: 2
Member Since:
20/10/2010
sp_UserOfflineSmall Offline

Thank you, this sounds promising ) But when debugging the addJSONData funtction, I see the "ts.p.treeANode == -1" condition is always true. I have no idea what treeANode field stands for, so I'll recheck my data I fill the grid with..

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
38 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