我的cshmtl上有以下代码:
@(Html.Kendo().Grid<KendoUIMvcApplication3.Models.Parts>()
.Name("grdParent")
.Columns(columns =>
{
columns.Bound(o => o.PartNo).Title("Part No").ClientTemplate("<a href='javascript:' onclick=\"OnSelectBtnClick1('#= PartNo#')\" >#= PartNo #</a>").Width(80);
columns.Bound(o => o.Decription).Title("Part Description").Width(180);
columns.Bound(o => o.Price).Title("Price").Width(30);
columns.Bound(o => o.Consignment).Title("Consign").Hidden(true).Width(20);
columns.Bound(o => o.Cat).Title("Cat").Width(10).Hidden(true);
})
.Scrollable()
.Selectable(selectable => selectable
.Mode(GridSelectionMode.Single)
.Type(GridSelectionType.Row))
.Resizable(resize => resize.Columns(true))
.Events(events => events
.DataBound("onDatabound"))
.DataSource(dataSource => dataSource
.Ajax().Read(read => read.Action("GetData", "Home")))
.ClientDetailTemplateId("Detail")
)
以下是我的_Layout.cshtml:
<link href="@Url.Content("~/Content/kendo/2013.3.1316/kendo.common.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2013.3.1316/kendo.dataviz.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2013.3.1316/kendo.default.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2013.3.1316/kendo.dataviz.default.min.css")" rel="stylesheet" type="text/css" />
如果我包含.Scrollable(),则网格中的列格式不正确 - 请参阅附图。任何人都可以帮我解决这个问题吗?感谢。