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

Need RadPanelBarItem Name

2 Answers 26 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 2
Adam asked on 20 Jan 2012, 02:43 PM
Hi, I'm currently working with a RadGridView that's nested inside a StackPanel that's nested inside a RadPanelBarItem. When I click on a cell inside the RadGrid, I launch a RadWindow. All this works perfectly thanks to several examples I found on the forum. My issue now is working with the different containers and getting their properties. I would like to be able to get the RadPanelBarItem Name value once I've clicked in the cell in the RadGridView.

I can use ParentOfType<> to actually see the object and set a variable based on it but the Name value is always blank. One thing to note, ALL of the objects I've mentioned are added dynamically.

So, how do I need to go about getting the Name value?

Thanks!!

2 Answers, 1 is accepted

Sort by
0
Accepted
Petar Mladenov
Telerik team
answered on 24 Jan 2012, 02:32 PM
Hello Adam ,

 Can you confirm that the ParentOfType<RadPanelBarItem> does not return null when invoked in your scenario and then the Name property is null, but you had set it ? Have you set x:Name in code behind via SetValue()?

Kind regards,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Adam
Top achievements
Rank 2
answered on 24 Jan 2012, 02:38 PM
Hi Petar,
I dug in on this yesterday and as it turns out I did NOT have the name property set. I set the name property and was able to get what I needed using the ParentOfType.

Thanks!
Tags
General Discussions
Asked by
Adam
Top achievements
Rank 2
Answers by
Petar Mladenov
Telerik team
Adam
Top achievements
Rank 2
Share this question
or