Paging gives 404 error when using .DataSource

2 posts, 0 answers
  1. Brian
    Brian avatar
    6 posts
    Member since:
    Sep 2013

    Posted 18 Sep 2013 Link to this post

    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?
  2. Brian
    Brian avatar
    6 posts
    Member since:
    Sep 2013

    Posted 18 Sep 2013 Link to this post

    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.
Back to Top