Hi,
i'm a beginner of wpf. I use c# and telerik rad controls for wpf. I like to create a simple application with a tabcontrol. I bind a TabViewModel to my TabControl. Also i have a frame control and i load different usercontrols in this frame. In one of these usercontrols i have a RadGridView-control where i load some data from database.
VisualTree:
MainWindow - TabControl - Frame - Usercontrol - RadGirdView
My Problem is, that i have to pass the datacontext from my TabControl to the RadGridView.
Because i want to add a new TabItem out of the DataRow of my RadGridView.
I hope it is clear enough.
Thanks a lot
Best Regards
R
Loading
Piyush PansuriyaPosted Dec 10, 2014, 4:53 AM
You have to add property to radgridview in xaml like :
DataContext="{Binding ElementName=TabControl ,Path=DataContext}"
It will take datacontext of your tabcontrol to RadGridView.