I have KendoMobileListView. In the template I also have a check-box. when user click on an item of the list there is a click event being fired. I would like to ignore the click event when user select/unselect the check-box.
please help
Hagai
1 Answer, 1 is accepted
0
Alexander Valchev
Telerik team
answered on 03 Jan 2013, 03:58 PM
Hello Sahar,
I am afraid that what you would like to achieve is not supported. In the current implementation the state of check boxes is toggled on click of the whole ListView item. You can test the behaviour here. This is done for usability - standard check box is too small and it might be difficult for the user to click on it with finger.
As an alternative approach I suggest using switch widget instead of check box.
To distinguish the click event of the switch from the one of the ListView you can check if the e.target is part of the switch e.g. if it have parent with class km-switch.
function onClick(e) {
var isSwitch = e.target.parents(".km-switch").length;