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
onSelectRow not called on checkboxes (formatter:'checkbox')
30/06/2011
21:26
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello Tony,

if one try to implement inline editing on ondblClickRow one could recive strange problem: the onSelectRow event will not fired if the user click on the disabled checkbox created by formatter:'checkbox'. See the demo. As a workaround one have to use beforeSelectRow instead of onSelectRow (see the fixed demo).

The problem make the line 2211 of the grid.base.js:

if (td.tagName == 'A' || ((td.tagName == 'INPUT' || td.tagName == 'TEXTAREA' || td.tagName == 'OPTION' || td.tagName == 'SELECT' ) && !scb) ) { return this; }

It seems to me in the line one should include additional test for td.disabled (or use :not(:disabled) selector). So one should do allow to select lines by clicking on the disabled inpit elements.

One more remark. Is it correct to use return this inside of click event handler (it is here and in the another line above)? One should not stop the event.

Best regards
Oleg 

14/08/2011
12:53
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Oleg, 

Not sure I understand the demos here.

Allow click on disabled input element is maybe good idea.

Not sure what to do with the returns. Will make some experiments.

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.

14/08/2011
13:00
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hi, Tony!

It seems that there are differences how different web browsers works with disabled elements. If you look at the demo in IE you you will be able to make double-click on the disabled checkbox. So the "click" event which I describe will be fired in IE in case of  double-click. The seme demo in Chrome not works because Chrome don't call "click" event on disabled element.

So my suggestion can improve the situation a little, but not really solve it.

Best regards
Oleg

P.S. I am glad to see you back. 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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