我已经实现了一个kendo mvc网格,只有3条记录。它在网格底部显示空白空白。我想仅为记录显示行。如何消除空白区域
@(Html.Kendo().Grid<CC.GRP.MCRequest.ViewModels.ActivityViewModel>()
.Name("GridActivity")
.Columns(columns =>
{
columns.Bound(o => o.ActivityID).Hidden();
columns.Bound(o => o.ServiceID);
columns.Bound(o => o.ActivityAppliesToName);
columns.Bound(o => o.TeamName);
columns.Bound(o => o.FullName);
columns.Bound(o => o.EmployeeID);
columns.Bound(o => o.RequiredBy);
columns.Bound(o => o.CompletedDate);
columns.Bound(o => o.Status);
columns.Bound(o => o.CountryCode);
columns.Bound(o => o.CreatedDate);
columns.Bound(o => o.CreatedBy);
columns.Bound(o => o.ModifiedDate);
})
.ToolBar(toolbar => toolbar.Create().Text("Add Activity"))
.Editable(editable => editable.Mode(GridEditMode.PopUp)
.TemplateName("ActivityEdit")
.Window(w=>w.Width(600)))
.Pageable()
.Sortable()
.Scrollable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(5)
.Model(model => model.Id(p => p.ActivityID))
.Create(create => create.Action("Activity_Create", "Activity"))
.Read(read => read.Action("Activity_Read", "Activity", new { id = 5 }))
.Update(update => update.Action("Activity_Update", "Activity"))
.Destroy(update => update.Action("Activity_Delete", "Activity"))
)
)
答案 0 :(得分:0)
我认为这与分页选项有关 - 如果你关闭分页,它会缩小以适应显示的记录数。
此外,您可能会发现此Telerik论坛主题非常有用:Dynamic Grid Height?