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

Paging doesn't work in the Grid

1 Answer 97 Views
Grid
This is a migrated thread and some comments may be shown as answers.
canon
Top achievements
Rank 1
canon asked on 07 Oct 2013, 02:26 AM
In the Kendo Grid below, I set the page size attribute to five - PageSize(5)

However, after inserting the 6th & 7th records, clicking  the 'Next' arrow doesn't take me to the second page.
In fact, none of the Paging buttons work - i don't have the ability to page through my data. Can you help?

I'm not reading data from a database - I just want to insert records into the grid that gets saved into a
temporary Dictionary<string, bool> variable and see if the paging works.

@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.ProductViewModel>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.ProductName);
columns.Bound(p => p.Discontinued);
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(172);
})
.ToolBar(toolbar => toolbar.Create())
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(5)
.Events(events => events.Error("error_handler"))
.Model(model => model.Id(p => p.ProductID))
.Create(update => update.Action("EditingInline_Create", "Grid"))
.Update(update => update.Action("EditingInline_Update", "Grid"))
.Destroy(update => update.Action("EditingInline_Destroy", "Grid"))
)
)

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 08 Oct 2013, 12:20 PM
Hi,

 
Most probably the server is not returning correctly formatted data or some of the required scripts are not included in the project:

1) You can check this article for more information about how to setup your project correctly on the server side. 
2) Please check this article for list of all required scripts.

If the information from the above articles didn't help - please provided runable project where the issue sus reproduced. 

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