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

HierarchyChildTemplate with MVVM

1 Answer 76 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Grigory
Top achievements
Rank 2
Grigory asked on 05 Apr 2019, 03:14 PM

Hello,

I spent some time but didn't find an answer to my questions. 

Is it possible to use HierarchyChildTemplate with MVVM approach?

The thing that I want to use a custom UserControl as DataTemplate inside HierarchyChildTemplate. I also want to use separate DataContext.

 

 

Regards,

Grigory

1 Answer, 1 is accepted

Sort by
0
Accepted
Vladimir Stoyanov
Telerik team
answered on 10 Apr 2019, 12:16 PM
Hello Grigory,

Can you check out the RowDetails feature of the RadGridView? It allows for placing any additional information with the help of DataTemplates for each GridViewRow.

By default the DataContext inside the RowDetails is the corresponding item in the ItemsSource of the RadGridView, however you can change the bindings within the DataTemplate to point to a different DataContext.

I hope you find this helpful.

Regards,
Vladimir Stoyanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Grigory
Top achievements
Rank 2
Answers by
Vladimir Stoyanov
Telerik team
Share this question
or