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
onCellSelect and editCell can be called with ci=-1
28/11/2014
21:25
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

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

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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