1
A
回答
0
我想这是你正在寻找的答案。
function resizeDetailGrid(gridElement) {
// resize detail column widths to match master column headings
gridElement.find('.k-detail-cell tbody tr td').each(function (index) {
var headerCell, detailCell, headerCellSelector, detailCellSelector;
headerCellSelector = kendo.format('.k-master-row td:nth-child({0})', index + 2);
detailCellSelector = kendo.format('.k-detail-cell tbody tr td:nth-child({0})', index + 1);
headerCell = gridElement.find(headerCellSelector).first();
detailCell = gridElement.find(detailCellSelector);
detailCell.width(headerCell.width());
});
}
并初始化网格
gridDetailInit: function() {
resizeDetailGrid($('#grid'));
}
你也可以添加一个水平滚动条到电网,如果你有这么多列。
希望此信息有帮助。
0
为了设置层次结构栅格的较小宽度,您可以显式设置层次结构栅格组件的宽度。这可以通过HtmlAttributes属性完成。
.HtmlAttributes(new {style="width: 500px;" })
相关问题
- 1. ui-grid(ng-grid)计算宽度过宽
- 2. kendo UI Grid Grid Timespan过滤
- 3. Kendo UI Grid,Durandal
- 4. Kendo UI Grid Grid模板
- 5. Kendo UI Grid Grid模板
- 6. 如何使用kendo-ui更改文本框的宽度?
- 7. 更改Kendo UI Scheduler中事件的宽度
- 8. Kendo ui grid if else
- 9. kendo UI Grid in angularjs
- 10. 如何使Kendo Grid Column自动宽度
- 11. Kendo Grid - 自动宽度和滚动
- 12. 更改Kendo Grid列绑定
- 13. Kendo Grid保存更改
- 14. 更改宽度kendo ui选择下拉菜单?
- 15. 当div的宽度改变时,角度UI-Grid不占用100%的宽度
- 16. 无法将子网格绑定到kendo中的第二行Hierarchy UI grid
- 17. 批量更新Kendo UI Grid动态更改值
- 18. Kendo UI Grid - 更新不会持续
- 19. Kendo UI Grid和ng风格
- 20. jQuery - Kendo UI Grid - 大量列
- 21. 我可以更改Kendo UI Grid的外键值吗?
- 22. Kendo UI Grid:如何更改滚动条的样式?
- 23. Kendo Grid:清除列宽
- 24. Kendo UI ASP.NET MVC Hierarcy Grid - DetailInit
- 25. Kendo UI Grid serverPagination兼容性
- 26. 为Kendo Grid UI设置groupHeaderTemplate
- 27. Kendo UI Grid多次触发
- 28. kendo UI grid datasource asp webforms
- 29. Kendo UI Grid - 显示行号
- 30. kendo ui grid编辑/导航
[只有链接回答非常皱眉](https://meta.stackexchange.com/a/8259/171858)。 –