新年快乐!
我想在label
中放置一个KendoUI Grid
,当我的页面加载时,我会传入某个表的主键,该表引用我在标签中显示的值的描述。当页面加载时工作正常,但是当我向网格添加新行时,它会切换回来并在那里显示主键值。
以下是我目前如何设置的部分内容:
在网格的schema
中,我添加了两个字段:
ManagerPK: {
type: "number",
defaultValue : SearchVariable
},
ManagerName: {
type: "string"
}
我的Kendo Grid的创建/更新定义如下:
create: {
type: "POST",
url: "AddSomeRow",
dataType: "json",
contentType: "application/json"
},
update: {
type: "POST",
url: "UpdateSomeRow",
dataType: "json",
contentType: "application/json"
},
并且在网格的列定义中,我将其定义为:
列:[
{
field: "ManagerPK",
title: "Manager Desc",
width: "8%",
template: "#=ManagerDesc ? ManagerDesc : ''#"
}
那么我应该如何将我的代码更改为不显示PK
并且始终是描述?