The following sample project demonstrates how to bind the Kendo UI Grid to a DataTable in ASP.NET MVC applications.
This approach is applicable when binding to any
The sample project example resolves two main issues, which are related to:
To see the complete project, refer to this repository on GitHub.
The Grid does not have an instance to a model object and cannot infer field types. You need to provide the model field definitions yourself.
The metadata of the DataTable contains this information. Pull it into the model definition as illustrated in
The aggregates suffer from a lack of type-information as well. The
ToDataSourceResult helper does not have information about the field types and fails to compute the aggregates on its own.
Provide type-information for the requested aggregates in the
DataSourceRequest object. For more information on this issue, refer to