Kendo UI and MVC 4 - Bind datatable in session

2 posts, 0 answers
  1. John
    John avatar
    1 posts
    Member since:
    Jan 2015

    Posted 03 Feb 2015 Link to this post

    I am having difficulty finding an example for binding the Kendo UI Grid for MVC 4 to a DataTable when using the ASPX view engine.

    I reviewed the example in this forum and I am finding other examples using the Razor view engine.

    Unfortunately, the MVC project to which I am assigned is very large and it is not a priority to convert to the Razor view engine at this time.  The priority is a conversion from MVC 2 to MVC 4 and it was expected the upgrade will go more quickly to stay with the ASPX view engine until a later date.

    The requirements are
    1. Stick with the ASPX view engine for now and 
    2.  Upgrade the controls to work with MVC 4 (for this we are using the latest Kendo UI for MVC 4).

    The binding scenario is to pull the DataTable from a session object called "GridResults" (That's right, it's not returned by the controller directly).

    We also need to add the DataKeys to the grid when binding to the session-held DataSource.

    If there are any examples of binding to a session DataSource returning a DataTable it would be appreciated.  Adding data keys would be a bonus.

    Thank you
  2. Atanas Korchev
    Atanas Korchev avatar
    8462 posts

    Posted 05 Feb 2015 Link to this post

    Hi John,

    Find attached a simple ASP.NET MVC project that shows DataTable binding with the ASPX view engine.

    Atanas Korchev

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top