My grid shows only 1 page of data until I apply a filter and then clear it. Having done that, it instantly shows all 28 pages.
1. does anyone have any idea what might be causing this?
2. is there any way to get it to recalculate the page list at the bottom of the grid after loading using a javascript command?
Here is the grid:
@(Html.Kendo().Grid<tpnconnect.com.AdminService.DeviceDataEdit>()
.Name("deviceGrid")
.Columns(columns =>
{
columns.Bound(d => d.DepotNumber).Width(60);
columns.Bound(d => d.DeviceName).Width(150);
columns.Bound(d => d.DeviceAlias).Width(150);
columns.Bound(d => d.AutoMode).Width(100).Title("Auto Mode").EditorTemplateName("AutoMode").ClientTemplate("#:AutoModeDisplay#");
columns.Bound(d => d.CreatedDate).Title("Created").Format("{0:dd-MMM-yy HH:mm}").Width(80);
columns.Bound(d => d.Active).Width(40).Filterable(true);
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(160);
})
.ToolBar(toolbar => toolbar.Create())
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.Sortable()
.Filterable()
.Scrollable()
.HtmlAttributes(new { style = "height:430px;" })
.DataSource(dataSource => dataSource
.Ajax()
.Model(model => model.Id(d => d.DeviceID))
.PageSize(20)
.ServerOperation(false)
.Events(events => events.Error("error_handler"))
.Create(update => update.Action("AddDevice", "Printer"))
.Read(read => read.Action("GetAllDevicesForEdit", "Printer"))
.Update(update => update.Action("UpdateDevice", "Printer"))
.Destroy(update => update.Action("DeleteDevice", "Printer"))
)
)