I have an example, a kendo ui grid is added with Backbone.js. In the kendo ui grid I have a buttons to remove rows, but the buttons don’t work on mobile devices. If I press a button repeteadly, it sometimes works. Why?
I declare the button in kendoGrid.columns so:
{
command: [{
name: "destroy",
text: "Remove",
className: "ob-delete"
}
To remove a row and do something when button is clicked:
$(document).on("click", ".grid tbody tr .ob-delete", function (e) {
var item = grid.dataItem($(this).closest("tr"));
var check = confirm("Delete");
if (check) {
grid.removeRow($(this).closest("tr"));
}
});
Edit:
I use the kendo ui version: 2012.3.1114
Mobile and click event are not best of friends!
In this code you are adding click on the Html element having .ob-delete class which will not fire Kendo’s built in click event. Instead, try to implement your delete method as custom command shown in this demo: http://demos.kendoui.com/web/grid/custom-command.html
or if a custom command is not required, try the default delete event as shown in this demo.
http://demos.kendoui.com/web/grid/editing-inline.html