gpt4 book ai didi

kendo-ui - Kendo UI/Angular 网格 - 如何折叠组

转载 作者:行者123 更新时间:2023-12-02 11:03:35 24 4
gpt4 key购买 nike

我有以下 Kendo UI Angular 网格:

<kendo-grid id="engagementGrid" options="engagementGridOptions"></kendo-grid>

Controller :

$scope.engagementGridOptions = {
dataSource: {
type: "json",
transport: {
read: "http://accountviewserver:8080/api/Engagement"
},
group: { field: "Name" }
},
sortable: true,
height: 200,

columns: [{
field: "Name",
width: "120px"
},{
field: "Project",
width: "200px"
},{
field: "StartDate",
width: "80px"
},{
field: "EndDate",
width: "80px"
},{
field: "PercentEngaged",
title: "% Engaged",
width: "50px"
}]
};

默认情况下使组折叠的正确 Kendo/Angular 语法是什么?

最佳答案

对于遇到此问题的人,请将其添加到您的网格选项中

dataBound: function () {
var grid = this;
grid.tbody.find("tr.k-grouping-row").each(function () { grid.collapseGroup(this); });
}

关于kendo-ui - Kendo UI/Angular 网格 - 如何折叠组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26457393/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com