Kendo ui 如何将剑道格线拆分为子格线和父格线?
所以我的网格有问题,因为它有太多的列。我想做的是将这个网格分成两半,当行被展开时,只有一半的列显示在主网格中,另一半显示在子网格中 基本上,父网格行中的数据必须与子网格行中的数据相同,只显示不同的列 下面的代码应转换为如下内容: 这是网格本身:Kendo ui 如何将剑道格线拆分为子格线和父格线?,kendo-ui,split,grid,row,expand,Kendo Ui,Split,Grid,Row,Expand,所以我的网格有问题,因为它有太多的列。我想做的是将这个网格分成两半,当行被展开时,只有一半的列显示在主网格中,另一半显示在子网格中 基本上,父网格行中的数据必须与子网格行中的数据相同,只显示不同的列 下面的代码应转换为如下内容: 这是网格本身: $("#Materials") .kendoGrid({ dataSource: { data: [], schema: { model: {
$("#Materials")
.kendoGrid({
dataSource: {
data: [],
schema: {
model: {
id: "ID",
fields: {
ID: { type: "number", editable: false },
Code: { type: "string", editable: false },
Name: { type: "string", editable: false },
ExternalCode1: { type: "string", editable: false },
ExternalCode2: { type: "string", editable: false },
OtherCode1: { type: "string", editable: false },
ServiceMode: { type: "string", editable: false },
}
}
},
pageSize: 20
},
pageable: true,
columns: [
{ field: "Code", title:"Code"},
{ field: "Name", title: "Name"},
{ field: "ExternalCode1", title:"External Code1"},
{ field: "ExternalCode2", title:"External Code2"},
{ field: "OtherCode1", title:"Other Code1"},
{ field: "ServiceMode", title:"Service Mode"},
],
editable: false
});
我正在使用ajax调用填充文档上的数据,以提高页面加载性能。您可以使用在子网格中使用的
detailInit
事件中传递的数据
如果这对你有用,试试这个。先生,你是救世主。谢谢,它确实有用。我还想知道您是否知道如何使用MVC Razor实现这一点,仅供将来参考。谢谢,不客气!对不起,我不熟悉MVC Razor。