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

Kendo UI and MVC 4 - Bind datatable in session

1 Answer 191 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 03 Feb 2015, 08:58 PM
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 http://www.telerik.com/support/code-library/binding-to-datatable-0191a594e359 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

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 05 Feb 2015, 03:18 PM
Hi John,

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

Regards,
Atanas Korchev
Telerik
 

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.

 
Tags
Grid
Asked by
John
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or