Forum



22:24

26/11/2012

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!
15:57

Moderators
30/10/2007

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.
16:19

26/11/2012

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!
18:11

Moderators
30/10/2007

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
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.
Most Users Ever Online: 715
Currently Online:
31 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66