【发布时间】:2016-04-14 10:36:50
【问题描述】:
我正在尝试在后面的代码中调用 cellTemplate 函数,但我无法调用。有没有办法从后面的代码中调用这个函数?我已经尝试过,如下所示,但行显示“ShowButton”
ListDxColum.Add(new DxColumns(){
dataField = "cor_ref",
caption = "",
allowFiltering = false,
cellTemplate = "ShowButton"
});
JAVASCRIPT
var orders = rec.documentList;
$("#gridContainer").dxDataGrid({
dataSource: {
store: {
type: "array",
key: "ID",
data: orders
}
},
paging: {
pageSize: 8
},
showRowLines: true,
showBorders: true,
selection: {
mode: "single"
},
filterRow: { visible: true },
//searchPanel: {
// visible: true
//},
columns: rec.DxColumHeader,
paging: { pageSize: 6 },
wordWrapEnabled: true,
filterRow: { visible: false },
columnAutoWidth: false
});
function ShowButton(container, options) {
console.log(options.data["cor_ref"]);
}
【问题讨论】:
-
据我了解,
code behind是服务器端的 c# 代码,不是吗?如果是这样,则无法从 c# 调用客户端 devextreme 代码。 -
是的,它是 c# 中的服务器端。谢谢您通知我
标签: asp.net devextreme