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
Adjacency Treegrid doesn't expand
11/05/2009
05:10
Avatar
VinZ40K
Member
Members
Forum Posts: 4
Member Since:
27/02/2009
sp_UserOfflineSmall Offline

I'm trying to get the Treegrid to automaticly expand the last open node after reloading the data. However I can't seem to get it to work, the expandNode function doesn't open the row.

My code:

$('#grid').expandNode($('#grid').getInd(lastClickedRow));

lastClickedRow is the rowId of the row I want to open. This function does something (the grid reloads), but it doesn't expand the rows. We load all the data at once, so the should be no need to reload the grid (when clicking in the grid on the + it opens fine, without reloading the grid)

What am I doing wrong, any ideas?

13/05/2009
14:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Try this

var mygrid = $("#grid");

mygrid.expandNode(mygrid.getInd(mygrid[0].rows, lastClickedRow, true));

To getInd we pass 3 parameters - object , rowid and true/false

in case of true we return the row object in case of false(default) rowIndex.

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.

14/05/2009
03:07
Avatar
VinZ40K
Member
Members
Forum Posts: 4
Member Since:
27/02/2009
sp_UserOfflineSmall Offline

I've tried your code, and while the grid doesn't reload it also doesn't expand the rows. The [+] icon does change to a [-], and clicking the [-] does nothing except change it back to the [+].

Clicking the [+] or [-] in the grid itself works perfect. Using the expandNode function just doesn't show the subrows. Any thoughts why?

15/05/2009
01:40
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Which version do you use?

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.

15/05/2009
04:23
Avatar
VinZ40K
Member
Members
Forum Posts: 4
Member Since:
27/02/2009
sp_UserOfflineSmall Offline

Version 3.4.3

20/05/2009
10:18
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

In order to understand what is going, could you please put the full configuration of the grid?

Thanks

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.

20/05/2009
10:30
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Ok,

I look into the code - You should first apply

expandRow and then expandNode something like this

$(”#mybutton”).click(function(){

var mygrid = $(”#grid”);

var record = mygrid.getInd(mygrid[0].rows, lastClickedRow, true);

mygrid.expandRow(record);

mygrid.expandNode(record);

return false;

});

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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