Completed
Last Updated: 11 Jan 2021 14:56 by ADMIN
Vesselin
Created on: 24 Jul 2012 17:09
Category: UI for ASP.NET MVC
Type: Feature Request
31
Make grid (or data source) parse related object property types
Currently when a grid is bound to a model with related objects and properties via JSON, the grid will only parse the top level object types and treat and related properties as generic objects hence dates are not dates anymore, etc.

Please consider having the grids parse related object properties and data types so there isn't a need for flattened ViewModels in order to properly visualize related data and be able to filter and sort it correctly.
3 comments
ADMIN
Alex Hajigeorgieva
Posted on: 11 Jan 2021 14:56

Hi,

The grid can bind to nested objects. You can take a look at the Custom Editor Demo

For filtering to work, you will need to bind the column to the filterable field in the model, for example:

columns.Bound(column => column.Category.Name);

Regards,
Alex Hajigeorgieva
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Aaron
Posted on: 12 Sep 2013 15:53
I concur.  I can't believe that:

A.) This is not already supported
B.) More users in the community have not been more vocal about this

Nested objects are nothing new.  We shouldn't be forced to create flattened VM's just so the grid will play nice.

Please add support for this, thanks!!
Imported User
Posted on: 25 Jul 2012 06:13
I agree! This is not an optimal solution for strongly typed data. 

If the grids were to parse sub objects, it would enhance developer productivity by 1) eliminating the need to flatten all sub objects and 2) provide filtering capability for fields that are not strings.

In the meantime, it should be documented somewhere that is the current functionality so that developers don't spend days trying to understand why their column binding does not work.