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
jQGrid keyboard navigation on grid with subgrids
06/08/2014
11:22
Avatar
ZX10Tomcat
New Member
Members
Forum Posts: 2
Member Since:
06/08/2014
sp_UserOfflineSmall Offline

I have a jQGrid with subgrid. I have an active cell

Image Enlarger

and when I press down arrow on keyboard cursor is disappeared. Obviously it goes to subgrid, but I wish that it goes to next visible row or to subgrid row, if exist 

Image Enlarger

11/08/2014
14:50
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

 

One possible reason for this is that you have eqial id in grid and subgrid - i.e you have id = 1 in grid and id = 1 in subgrid.

To resolve the problem you will need to use idPrefix in subgrid. See docs.

 

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.

18/08/2014
12:29
Avatar
ZX10Tomcat
New Member
Members
Forum Posts: 2
Member Since:
06/08/2014
sp_UserOfflineSmall Offline

Thank you for your answer!

But I think the problem isn't in it, I'm already have idprefix. here's my grid definitions (sorry for messy).

$("#EditTimeGrid").jqGrid({
datatype: "local",
loadonce: true,
multiselect: false,
data: mainData,
scrollrows: true,
height: "100%",
colNames: ['@Resource.ID', '', 'MainID', 'FullDate', '@Resource.Date', '@Resource.Day', 'DayNum', '@Resource.Project_Category',
'@Resource.Start', '@Resource.End', '@Resource.Lunch', '@Resource.BillHours', '@Resource.NonBillHours', '@Resource.TotalHours',
'@Resource.Notes', '', 'start', 'end', '', ''],

...

rowattr: function (rd) {
return { "class": "boldRow" };
},
rowNum: 10,
//rowList: [5, 10, 20],
//gridview: true,
cellEdit: editMode,
cellsubmit: 'clientArray',
ignoreCase: true,
rownumbers: true,
// sortname: 'DayAsNumber',
// sortorder: "asc",
viewrecords: true,
autoencode: true,
footerrow: true
, idPrefix: "s_"

, subGrid: true

 

and for subgrid

$subgrid.jqGrid({
datatype: "local"
, scrollrows: true
, multiselect: false
, data: sd

...

, height: "100%"
, rowNum: 10
, autoencode: true
//gridview: true,
, cellEdit: editMode
, cellsubmit: 'clientArray'
, idPrefix: rowId + "_"

 

I've made some investigation and found a function in the jquery.jqgrid.src.js file

(line 10282)

.keydown(function (e) {

...

switch (kdir) {
case 38:
if ($t.p.iRow - 1 > 0) {
scrollGrid($t.p.iRow-1,$t.p.iCol,'vu');
$($t).jqGrid("editCell",$t.p.iRow-1,$t.p.iCol,false);
}
break;

 

If we press right or left arrow, we found next visible column, but if we pressed up or down key we just go to next or previous row, even if it's a subgrid's invisible row.  Maybe I'm wrong with my opinions.

20/08/2014
12:43
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

 

Thanks for the investigation.

You are right - we should made  checking in order to have movement only in the current grid (and not in the subgrid or row that  is custom created in grid)

 

I will see if I can fix this for the next release - if so I will let you know.

 

Kind Regards

Tony

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