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

Paging gives 404 error when using .DataSource

1 Answer 247 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 18 Sep 2013, 08:17 PM
I am having trouble getting Paging to work while using the DataSource option on a Kendo UI Grid, using MVC wrappers.   

When I comment out the DataSource code, paging works just fine. 
When I use the DataSource option, it gives me a 404 "not found" error when I try to move to another page.

See the attached screenshots for my code.  One screenshot is the .cshtml file.   The other is the Controller.

Can anyone please help?

1 Answer, 1 is accepted

Sort by
0
Brian
Top achievements
Rank 1
answered on 18 Sep 2013, 08:45 PM
Ok, duh!  I couldn't extrapolate from the demo's that the "Grid" part of the .Read option should be the name of the controller.  I assumed it was the name of the grid.

Beginner's luck I guess :)

It is working by doing:
.DataSource(dataSource => dataSource
        .Ajax()
        .Read(read => read.Action("Index", "TypeCode"))
)
TypeCode is the name of my controller.
Tags
Grid
Asked by
Brian
Top achievements
Rank 1
Answers by
Brian
Top achievements
Rank 1
Share this question
or