How to bind a complex object to RadGrid

1 Answer 118 Views
Grid
Jonathan
Top achievements
Rank 1
Iron
Jonathan asked on 26 Sep 2022, 08:07 PM

Hello,

I have a DataForm that is bound to a complex object.  Within this complex object we have sub-objects that are Lists<> of other objects.  How can I put a RadGrid inside the DataForm and have it bind to the sub-object List<>?

1 Answer, 1 is accepted

Sort by
0
Doncho
Telerik team
answered on 29 Sep 2022, 12:59 PM

Hi Jonathan,

It is always recommended to use the NeedDataSource event handler for binding data to the RadGrid programmatically

In this case, NeedDataSource can be insufficient and you can try adding the DataBinding event of the Grid as well. You can check a working demonstration of a Grid nested inside another Grid in the link below. The approach for nesting the Grid in a DataForm should be quite similar.

I hope this will prove helpful.

Kind regards,
Doncho
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/.

Tags
Grid
Asked by
Jonathan
Top achievements
Rank 1
Iron
Answers by
Doncho
Telerik team
Share this question
or