我是Kendo UI的新手。我有以下代码:
@(Html.Kendo().Grid<ETS.Model.CompanyList>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.CompanyID).Title("Name").Template(@<text>@Html.ActionLink(@item.Name, "Company", "Companies", new { @id = @item.CompanyID }, new { @style = "color:black; text-decoration: none;" })</text>);
columns.Bound(p => p.City).Title("Billing City");
columns.Bound(p => p.SalesRep).Title("Sales Rep");
columns.Bound(p => p.Phone).Title("Company Name");
})
.Pageable(pageable => pageable
.PageSizes(true)
.ButtonCount(5)
.Refresh(true)
)
.Sortable()
.HtmlAttributes(new { style = "height: auto;" })
.BindTo(Model.Companies)
)
默认情况下,网格上显示5个项目。是否有办法将该默认值更改为20?
.DataSource(ds => ds.Server().PageSize(20))
来查看是否有所不同吗? - Rion Williamsvar grid = $("#grid").kendoGrid({ ... });
……这个目的不是有一个参数吗? - Jeach