Forum
15:19
04/05/2011
Hi,
I'd like to implement the shift key support on multi selection on jqgrid (excel-like grid). As far as i know, it's not directly supported by the current version.
What i've had in mind is to employ the beforeSelectRow(rowid, e) event. But i'm just wondering why the iRow (index of the row) is not passed as parameter as well. I suppose with the iRow in place, we can highlight the multiselection from last checked row until current checked row (with shift key).
or is there any better way to implement the shift key support on multi selection?
thanks,
jibran
12:19
04/05/2011
sorry, maybe I'm not too clear in explaining the expected behaviour.
what I'd like to implement is the shift key in which we can select multiple rows (in sequence) in one click.
e.g., first we select row 2, then with shift key pressed, when we select row 6, row 2 - 6 will be selected all at once. (like selecting rows in ms excel)
At first I thought the same, the multikey: "shiftKey" would do such behaviour. apparently it is not. With that, the selection only works with the shift key otherwise it does not do the selection.
That is why I think, we can hook the custom implementation in 'beforeSelectRow' event. unfortunately on that method, there's no iRow parameter given. Without that, as far as i can tell, we could not do the calculation to select multiple rows all at once based on the previous selected row.
I've tried to modify the source in grid.base.js to pass the 'iRow' on beforeSelectRow() method. and it works. However i'd like to know is there any idea, how to do that without changing the source code of jgqrid library?
thanks,
jibran
Most Users Ever Online: 715
Currently Online:
43 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66