2017-09-24 40 views

回答

1

您可以隨時綁定初始化後edit事件和處理創建那裏。請注意,文件說edit事件處理兩種創建編輯,所以沒有create事件在微件中,只有edit

function grid_edit(e) { 
    if (!e.model.isNew()) { 
    // Disable the editor of the "id" column when editing data items 
    var numeric = e.container.find("input[name=id]").data("kendoNumericTextBox"); 
    numeric.enable(false); 
    } 
} 

$("#grid").data("kendoGrid").bind("edit", grid_edit); 

Demo