html - Kendo UI MVC4 网格列标题与数据不对齐

标签 html css asp.net-mvc-4 alignment kendo-grid

我正在使用 kendo UI MVC4 助手。我已经为每一列设置了固定宽度,但是在加载数据时,数据和标题没有对齐。然后,在调整任何列的大小时,所有列都将正确对齐(没问题)。请让我知道加载内容时要解决的任何解决方案。并且我也在使用分组。

请检查屏幕截图。

加载数据后

enter image description here

调整任何列的大小后 enter image description here

请检查我的 html 帮助程序部分。

.....
.Columns(columns =>
                 {
                     columns.Bound(p => p.EvaluationDT_ID).Hidden(true);
                     columns.Bound(p => p.ItemID).Hidden(true);
                     columns.Bound(p => p.ItemName).Width("160px").HtmlAttributes(new { title = "#= ItemName #" }).Sortable(true);
                     columns.Bound(p => p.Itemcode).Width("80px");
                     columns.Bound(p => p.Brand).Width("90px").HtmlAttributes(new { title = "#= Brand #" });
                     columns.Bound(p => p.Weight).Width("50px").HtmlAttributes(new { style = "text-align: right" }).HeaderHtmlAttributes(new { style = "text-align:left;" });
                     columns.Bound(p => p.UOMCode).Width("50px");
                     columns.Bound(p => p.PackagingName).Width("50px");
......

最佳答案

试试这个博客的答案。可能会有帮助。

http://blog.falafel.com/kendo-grid-hierarchy-shared-column-headers/

关于html - Kendo UI MVC4 网格列标题与数据不对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29912138/

相关文章:

javascript - 通过js更改切换按钮

html - 如何让我的导航保持在顶部?

ASP.NET MVC 4 - CMS/CMS 组件(如 Wordpress)

css - 高度:100% 和窗口调整大小:高度将不再是 100%

facebook - 外部登录不适用于 MVC 4 web 应用程序中的 facebook

c# - 多值GET参数-路由生成

html - CSS 扩展文本超链接及其下划线之间的空间

html - 网站帮助 - 创建更好的 ChatRoulette

css - 使用 Anime.js 将元素定位到任何设备的右下角

javascript - 在 HTML Canvas 和 javascript 动画中添加一系列引导按钮