A Button In A Kendo Ui Grid Doesn't Work On Mobile Device
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 butto
Solution 1:
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
$(document).ready(function () {
var grid = $("#grid").kendoGrid({
dataSource: {
pageSize: 10,
data: createRandomData(50)
},
pageable: true,
height: 260,
columns: [
{ field: "FirstName", title: "First Name" },
{ field: "LastName", title: "Last Name" },
{ field: "Title" },
{ command: { text: "View Details", click: showDetails }, title: " ", width: "140px" }]
}).data("kendoGrid");
wnd = $("#details")
.kendoWindow({
title: "Customer Details",
modal: true,
visible: false,
resizable: false,
width: 300
}).data("kendoWindow");
detailsTemplate = kendo.template($("#template").html());
});
functionshowDetails(e) {
e.preventDefault();
var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
wnd.content(detailsTemplate(dataItem));
wnd.center().open();
}
</script>
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
Post a Comment for "A Button In A Kendo Ui Grid Doesn't Work On Mobile Device"