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
Collapsing to selected rod
26/11/2012
22:24
Avatar
SammyD
Member
Members
Forum Posts: 9
Member Since:
26/11/2012
sp_UserOfflineSmall Offline

Hi,

New to using the grid, and have a question. I have a lengthy grid, that only allows single row selection.

Because of page realestate, is it possible to collapse the grid to the selected row? Or maybe the header and the selected row? Then, when they mouse over the row (and/or header), the grid expands and shows itself?  When the user selects a different row, the grid will then collapse again, back to the newly selected row.

Thanks!

27/11/2012
15:57
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

What you mean with collapse the grid to the selected row?

Im'little confused to understand this.

Regards

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.

27/11/2012
16:19
Avatar
SammyD
Member
Members
Forum Posts: 9
Member Since:
26/11/2012
sp_UserOfflineSmall Offline

Thanks for the reply.

Right now, the grid to defaults, to showing 10 rows of data. When they select (click on) a row, I would like to collapse the other 9 rows (not show them), so the grid will only show the header + the selected row.

When they mouse back over the selected row, then all the rows of the grid will show again.

As soon as they click on a row (or off the grid), the grid collapses back again to the header + the selected row.

Does that help?  Thanks a bunch!

27/11/2012
18:11
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

You can use the onSelectRow event. In this event you can use the getDataIDs to get all the ids in the grid.

Since the retun of this function is array with the data id's (see docs) you can loop and hide all the needed rows except the

selected ( use the selrow parameter which return the selected row)

You will need then to bind a click event on document (except on the grid) where you do the same procedure, but to show the grid rows.

I hope this will help - the implementation belong to you Wink

Regards

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:
17 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