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
multi select with shift key
04/05/2011
15:19
Avatar
ajibrans
hamburg
New Member
Members
Forum Posts: 2
Member Since:
04/05/2011
sp_UserOfflineSmall Offline

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

16/05/2011
11:25
Avatar
kobruleht
Member
Members
Forum Posts: 144
Member Since:
05/05/2011
sp_UserOfflineSmall Offline

use 

multikey: "shiftKey", 

 

Note that there is a bug in jqGrid which causes all checkboxes to be selected on click if this option is present.

16/05/2011
12:19
Avatar
ajibrans
hamburg
New Member
Members
Forum Posts: 2
Member Since:
04/05/2011
sp_UserOfflineSmall Offline

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

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information