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)。 –