This is a migrated thread and some comments may be shown as answers.

Default grid paging is wrong

1 Answer 87 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vita
Top achievements
Rank 1
Vita asked on 05 Dec 2012, 01:32 AM
I have a scrolable, pageable grid which I add to MVC view via html kendo helper with selectable page size

@(Html.Kendo().Grid(Model.AvailableEmployees).Name("EmployeeGrid").Columns(cols =>
{
    cols.Bound(...).
    ClientTemplate("<input type=\"checkbox\" class=\"check_select\" data-id='#= data.ID #' />").
    HeaderTemplate("<input type=\"checkbox\" id=\"headerCheck\" />").Sortable(false).Filterable(false).Width(50);
    cols.Bound(...).HeaderTemplate(...).Width(150);
...
})
.HtmlAttributes(new { style = "width:90%;" })
.Pageable(
    pager => pager.PageSizes(new int[] { 20, 50, 100 })
)
.Sortable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
)
.Selectable
            (selectable => selectable.Mode(GridSelectionMode.Multiple)))

However, when the grid renders it always displays 10(???) users per page on initial render.  And chages it to correct number once you start changing the options on the page size dropdown.  How to make it display the correct number on the first render?

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 06 Dec 2012, 05:31 PM
Hi Vita,

 
Could you please provide run-able project where the issue is reproduced? I tried to reproduce the problem locally with the provided code but to no avail – everything is working as expected on our side. 

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Vita
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or