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. Kendo UI Grid Grid模板
- 2. 如何使用kendo-ui更改文本框的宽度?
- 3. Kendo ui grid if else
- 4. kendo UI Grid in angularjs
- 5. 如何使Kendo Grid Column自动宽度
- 6. 批量更新Kendo UI Grid动态更改值
- 7. Kendo UI Grid - 更新不会持续
- 8. Kendo UI Grid和ng风格
- 9. 为Kendo Grid UI设置groupHeaderTemplate
- 10. Kendo UI Grid - 删除组列?
- 11. Kendo UI Grid和组合列
- 12. Kendo UI Grid Anuglar Cell Color
- 13. Kendo UI Grid替代方案
- 14. 更改宽度的形式语义ui
- 15. Kendo UI Grid ASP.NET MVC - UI怪异
- 16. Kendo UI DropDownList - 更改确认
- 17. 检测对角度ui-grid的列可见度的更改
- 18. Semantic-ui:更改卡片宽度?
- 19. Jquery UI更改滑块手柄宽度?
- 20. Kendo UI Grid编辑弹出窗口的更改更新方法返回值
- 21. Kendo UI Grid中的自定义命令
- 22. jquery更改div的宽度
- 23. Kendo UI MVC Grid - DataSource干扰列模板
- 24. Kendo UI - 全球更改邮件选项
- 25. 在Kendo UI中更改语言
- 26. 更改Flex Grid中的列宽
- 27. 当更改网格的宽度时更新矩形的宽度
- 28. Telerik MVC Grid Hierarchy - 没有儿童记录
- 29. Kendo UI Grid - 分组表格标头
- 30. Kendo-ui-angular2 grid selectable =“true”not working
[只有链接回答非常皱眉](https://meta.stackexchange.com/a/8259/171858)。 –