Forum
08:11
16/09/2009
Hi Tony,
What would you think about adding the event to the parameters passed to user-defined functions for ondblClickRow:
• grid.base.js ~line 1238 in jqGrid version 3.5.3
$(this).dblclick(function(e) {
td = (e.target);
ptr = $(td,ts.rows).parents(”tr.jqgrow”);
if($(ptr).length === 0 ){return false;}
ri = ptr[0].rowIndex;
ci = !$(td).is('td') ? $(td).parents(”td:first”)[0].cellIndex : td.cellIndex;
if(isMSIE) {ci = $.jgrid.getAbsoluteIndex(ptr[0],ci);}
ts.p.ondblClickRow($(ptr).attr(”id”),ri,ci, e);
return false;
});
}
Then, in ondblClickRow: in the jqGrid definition, we could harvest the shiftKey and other goodies from the event –
if(e.shiftKey) {
addRowBasedOnThisRow(); // Use this row's values as a template for add
} else {
editThisRow();
}
},
It might make sense for onRightClickRow: as well. Others?
Thanks,
DRHansen
11:11
Moderators
30/10/2007
Hello,
Thanks. Good idea. Added in GitHub. Also I add this to onrightClick event
Best 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.
Most Users Ever Online: 715
Currently Online:
58 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