【发布时间】:2019-11-14 13:47:30
【问题描述】:
我有 Kendogrid 网格,我通过 JSON 获取我拥有的 URL 的数据并激活选择模式,因为我找到了剑道网格文档,但是我正在尝试从剑道网格中获取选定的数据,请尝试使用 javascript 中的一些方法但我还没有做到。如果有人可以帮助我?
$(document).ready(function () {
$("#grid").kendoGrid({
toolbar: ["excel"],
excel: {
fileName: "user.xlsx",
filterable: true
},
dataSource: {
transport: {
read: {
url: `/user`
}
},
schema: {
data: function (response) {
return response.permisos;
},
model: {
fields: {
id: { type: "number" },
nombre: { type: "string" },
descripcion: { type: "string" }
}
}
},
pageSize: 20
},
height: 550,
scrollable: false,
sortable: true,
filterable: true,
pageable: true,
persistSelection: true,
change: onChange,
columns: [
{ selectable: true, width: "50px" },
{ field: "id", title: "Id" },
{ field: "nombre", title: "Nombre" },
{ field: "descripcion", title: "Descripción" }
]
});
$("#grid").data("kendoGrid").wrapper.find(".k-grid-header-wrap").off("scroll.kendoGrid");
});
【问题讨论】:
-
你检查demos.telerik.com/kendo-ui/grid/checkbox-selection上的例子了吗?这不是你想要达到的目标吗?
标签: asp.net-mvc checkbox kendo-grid