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
Keyboard navigation on jqgrid with subgrid
13/08/2012
15:31
Avatar
bruno123
New Member
Members
Forum Posts: 1
Member Since:
13/08/2012
sp_UserOfflineSmall Offline

I'm using the bindkeys function in jqgrid to navigate with my keyboard on the grid

$("#List").jqGrid('bindKeys');

But the problem is that I also use a subgrid row to show some values :

subGridRowExpanded: function (subId, id) {
$("#" + subId).append($('#List').getCell(id, 'detail'));
}

That makes it impossible to use the down key to select the next row (the selected row expands when the user selects the row). If the user closes the subgrid row, he can use the down key again. The subgrid row is blocking the navigation if opened.

On the other hand, the up key is always working.

Image Enlarger

06/10/2013
15:53
Avatar
joo
Hungary
New Member
Members
Forum Posts: 1
Member Since:
06/10/2013
sp_UserOfflineSmall Offline

You should patch jqGrid, because up/down key handling fails, when subgrid is opened.

if(event.keyCode === 38 ){

r = target.previousSibling;

id = "";

if(r) {

if($(r).is(":hidden") || !$(r).hasClass('jqgrow')) {

while(r) {

r = r.previousSibling;

if(!$(r).is(":hidden") && $(r).hasClass('jqgrow')) {id = r.id;break;}

}

} else {

id = r.id;

}

}

$($t).jqGrid('setSelection', id, true, event);

event.preventDefault();

}

|| !$(r).hasClass('jqgrow') is my patch, beacause when you open the subgrid r will be the row of subgrid. If the subgrid is closed it's operate by reason of ":hidden".

bruno123 said:

I'm using the bindkeys function in jqgrid to navigate with my keyboard on the grid

$("#List").jqGrid('bindKeys');

But the problem is that I also use a subgrid row to show some values :

subGridRowExpanded: function (subId, id) {
$("#" + subId).append($('#List').getCell(id, 'detail'));
}

That makes it impossible to use the down key to select the next row (the selected row expands when the user selects the row). If the user closes the subgrid row, he can use the down key again. The subgrid row is blocking the navigation if opened.

On the other hand, the up key is always working.

Image Enlarger


Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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