Kendo UI for Angular Grid Detail 展开/折叠按钮是否可以移动到网格右侧?
看来 kendo-ui 默认将展开/折叠到剑道网格的最左边一列。我需要看看是否可以将其移至右侧的按钮。
我们可以通过使用一些自定义 CSS 隐藏当前的 +/- 图标并手动将此类图标添加到最后一列来实现它。然后,当单击最后一列中的图标时,我们需要使用以下命令以编程方式展开和折叠详细信息模板:展开行 https://www.telerik.com/kendo-angular-ui/components/grid/api/GridComponent/#toc-expandrow and 折叠行 https://www.telerik.com/kendo-angular-ui/components/grid/api/GridComponent/#toc-collapserow网格的功能。
结合这些笨蛋看看https://plnkr.co/edit/hc8eYXNTZyFqfRvOiCrc?p=preview https://plnkr.co/edit/hc8eYXNTZyFqfRvOiCrc?p=preview
.k-icon.k-plus:before {
content: none;
}
.k-icon.k-minus:before {
content: none;
}
.k-icon.k-plus, .k-icon.k-minus{
pointer-events: none;
}
.k-detail-cell{
overflow: visible !important
}
.k-detail-cell section{
margin-left: -32px;
}
https://plnkr.co/edit/HaCEdMYUtAj4RlpebQnj?p=preview https://plnkr.co/edit/HaCEdMYUtAj4RlpebQnj?p=preview
//import components
import {
GridComponent,
GridDataResult,
DataStateChangeEvent
} from '@progress/kendo-angular-grid';
//get the child
@ViewChild(GridComponent) grid: GridComponent;
//modify your logic here
public ngAfterViewInit(): void {
// Expand all first rows initially
for(let i = 0; i < this.pageSize; i++) {
this.grid.expandRow(i);
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)