<div id="grid" data-role="grid" data-bind="source: contacts_Listing_ViewModel.grid_Datasource, visible: isListingVisible" data-editable="false" data-columns='["FirstName","LastName", "DepartmentName"]' data-pageable="true" data-autoBind="false" style="height:100%;width:100%"></div>$("#list_contactos").kendoGrid({ columns: [ {title: "Móvil", field: "_movil",width: 90}, {title: "Apellido1", field: "_ape1",width: 150}, {title: "Apellido2", field: "_ape2",width: 150}, {title: "Nombre", field: "_nombre",width: 150} ], dataSource: ds, change: function(e) { //handler para manejar la seleccion de filas var fila = this.dataItem(this.select()); if(fila == null) return; $("#txtMovil").val(fila._movil); $("#txtNombre").val(fila._nombre); $("#txtApellido1").val(fila._ape1); $("#txtApellido2").val(fila._ape2); }, selectable: "row", scrollable: true, height: 450 }); $("#grid").kendoGrid({
dataSource: {
type: "json",
serverPaging: true,
serverSorting: true,
pageSize: 3000,
allowUnsort: true,
transport: {
read: {
url: "homecontroller/action1",
type: "post",
contentType: "application/json; charset=utf-8",
dataType: "json"
},
parameterMap: function (options) {
return JSON.stringify(options); }
},
schema: { data: "Data", total: "TotalRowCount" }
},
groupable: true,
sortable: true,
pageable: true,
selectable: "multiple",
scrollable: {
virtual: true
},
columns:
[
//column definitions here
]
});
I've put together a little app using Kendo UI that stores user inputs in a Javascript array, and then prints these items out by adding text to a div. Along with the text, I need to have a delete button to remove these items from the array.
Since I'm adding the delete buttons to the DOM after I initialize Kendo UI, I assume I need to use the.kendoMobileButton() method on each button I add. If I don't do this, my buttons aren't styled correctly, despite being given the attribute data-role="button".
Still, when I try to use these buttons, I can't get them to call a function with data-click="deleteNumber". The function simply doesn't seem to fire. Any hints?
Here is a quick example I threw together that illustrates my problem: http://crocdoc.ifas.ufl.edu/files/kendo_example/