小编Ahm*_*mil的帖子

如何找出kendo网格中有多少行?

我有一个像这样的剑道网格

$("#HoleGrid").kendoGrid({ ... });
Run Code Online (Sandbox Code Playgroud)

如何找出网格中有多少行?

kendo-ui kendo-grid kendo-asp.net-mvc

3
推荐指数
1
解决办法
9795
查看次数

Kendo Grid 显示错误“未捕获的类型错误:无法读取未定义的属性‘模板’”

未捕获的类型错误:无法读取未定义的属性“模板”

我正在使用剑道网格。

我想在编辑时禁用列。(不是在我添加新记录时)。编辑时写了代码

function onEdit(e) {
    var indexCell = 1;
    var grid = $('#consumablesGrid').data('kendoGrid');


    if (e.model.id) { // when Editing the id is defined
        if (indexCell != 'undefined' && grid.columns[indexCell].title == "Consumable") {
            grid.closeCell();    
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

但它"Uncaught TypeError: Cannot read property 'template' of undefined "在执行时显示grid.closeCell()

为了更好地理解,我包括我的完整网格条件。

function ConsumableManager() {
    $("#consumablesGrid").kendoGrid({
        dataSource: {

            transport: {
                read: {
                    url: "GetConsumablesGrid",
                    type: "POST",
                    contentType: "application/json",
                    dataType: "json"
                },

                update: {
                    url: "UpdateConsumables",
                    contentType: "application/json",
                    type: "POST",
                    dataType: "json", …
Run Code Online (Sandbox Code Playgroud)

kendo-ui kendo-grid

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

kendo-grid ×2

kendo-ui ×2

kendo-asp.net-mvc ×1