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
Too much recursion when collapse row
20/10/2009
06:29
Avatar
bigup
Member
Members
Forum Posts: 3
Member Since:
20/02/2009
sp_UserOfflineSmall Offline

hi ! I 'm french so sorry for my approximative english

I deteced a error in treegrid , i receive the error "too much recursion in firefox" or "out of memory in IE". I resolve this by add a condition in the function collpaseRow in the treegrid object :

collapseRow: function(record) {
            this.each(function() {
                var $t = this;
                if (!$t.grid || !$t.p.treeGrid) { return; }
                var childern = $($t).getNodeChildren(record);
                $(childern).each(function(i) {
                $(this).css("display", "none");
                    if(this.expanded)
                    $($t).collapseRow(this);
                });
            });
        }

Bye

04/11/2009
09:52
Avatar
arcturus
New Member
Members
Forum Posts: 2
Member Since:
01/11/2009
sp_UserOfflineSmall Offline

I too am suffering with the 'too much recursion' problem with Firefox when I collapse certain branches of a deep tree grid.  IE8 gives an 'Out of Memory' error. Small branches can be closed successfully.

I tried the above fix with jqGrid 3.5.3 but no joy so I then tried jqGrid 3.6beta and I noted that the above fix had been included but with additional changes to the function. But alas the error still occurs.

I'm new to jquery & even newer to jqgrid as this is my first foray with it so perhaps I am not using it correctly.

The grid at http://familytrees.genopro.com.....ntTree.htm exhibits the problem.

I tried to diagnose the problem using FireBug without success. I suspect it is a problem with getNodeChildren function

Any help appreciated. Smile

04/11/2009
23:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

I found your problem and the cause.

In your xml data you have equal id – example

The name:  Sirius Black ( b. 7 Aug 1959 d. Jun 1996)

once you have

<row>
<cell>ind00009</cell>
<cell>Sirius Black ( b. 7 Aug 1959 d. Jun 1996)</cell>
<cell>15</cell>
<cell>fam00007Children</cell>
<cell>true</cell>
<cell>true</cell>
</row>

And the same second time

<row>
<cell>ind00009</cell>
<cell>Sirius Black ( b. 7 Aug 1959 d. Jun 1996)</cell>
<cell>15</cell>
<cell>fam00007Children</cell>
<cell>true</cell>
<cell>true</cell>
</row>

This coause infine loop of the recursion.

In order to correct  – EVERY ITEM in the xml SHOULD HAVE UNIQUIE ID and correct setting of parent node.

In terms of jqGrid this is not valid xml tree data.

If you notice you can not select some nodes in the tree, because of the reason listed above

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

05/11/2009
10:39
Avatar
arcturus
New Member
Members
Forum Posts: 2
Member Since:
01/11/2009
sp_UserOfflineSmall Offline

Brilliant! Thanks for finding that Tony and hands up Embarassed it was my data that was at fault.  In this particular data set there is a marriage between two second cousins and hence the family occurs twice, once in each branch of the family. I'll have to find a way to differentiate the IDs.

Thank you for a great plugin and the support is 1st class too Cool

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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