Forum
21:25
10/08/2009
Hello Tony,
click event handler can be called with e.tagret which is DOM of tbody, tr, td or some sub-element of td. If one select a text in the grid using mouse then click event will be triggered on mouse up. So If one selects text of multiple rows of the grid then tbody will be e.tagret. If one select a text from multiple columns of one row then tr will be e.target. The case when e.target is td or some sub-element of td is the most standard case.
The current implementation of click event handler contains the lineÂ
ptr = $(td,ts.rows).closest("tr.jqgrow");
The next tests whether $(ptr).length === 0 and makes return this; (which should be return; or return true; by the way). So the case where tbody will be e.tagret will be not a problem.
On the other side the case when tr will be e.target follow to setting ci=-1 and tdHtml=undefined in the linesÂ
ci = $.jgrid.getCellIndex(td); tdHtml = $(td).closest("td,th").html();
 In the next lines the callback onCellSelect can be called with the values and editCell can be called with ci=-1. It's a bug.
I suggest to insert the line
td = $(td).closest("tr.jqgrow>td");
before call of $.jgrid.getCellIndex and to use if td.length > 0 as additional criteria in the code below.
The exact changes of jqGrid code can be seen here.
Best regards
Oleg
Most Users Ever Online: 715
Currently Online:
35 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