Click here to Skip to main content
15,031,941 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
In my project i.e in WPF there is TabControl with 4 tab. On the 4th Tab a UserControl that hold a DataGrid. I want to navigate the tha TabItem 1 i.e TabIndex 0 when click on the Row of DataGrid

Before above when my DataGrid is directly hosted on the TabItem 4 not a UserControl, I am able to navigate the TabItem 1 according to This[^] but when I put the DataGrid on the UserControl the not able to navigate.

Please help me...
Posted
Updated 29-Dec-14 20:44pm
v2
Comments
Gold$Coin 6-Jan-15 22:02pm
   
The question itself was not clear enough. please correct the typo and make it clear. Before posting questions read it out, weather you can understand it by your self then post it.

1 solution

You need to bubble event in usercontrol to the main window. once the event is routed you can catch the event in mainwindow and it will work like the one what you have described

"Before above when my DataGrid is directly hosted on the TabItem 4 not a UserControl, I am able to navigate the TabItem 1 "

Hope you are getting the idea. Hope it helps :)
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900