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

Access Controls in same TabItem

1 Answer 82 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Falk
Top achievements
Rank 1
Falk asked on 17 Jun 2018, 05:10 PM

Hi all,

i have a TabControl with a DataTemplate including a Radgridview and a Toolbar.

When a row in the Grid is selected I want to enable a Button in the Toolbar.

My Question is: How can I access the properties of the button in the same TabItem?

I have tried the ParentOfType property for the Sender Object in the "SelectionChanged" Event of the Gridview, with no success.

How can I achieve this?

1 Answer, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 20 Jun 2018, 12:15 PM
Hi Falk,

There are different ways of accessing the RadToolBar from code behind. Basically, it depends on your implementation set-up. One way is to use the Items collection of the RadToolBar and directly get the desired button. I have created a sample project which demonstrates how you can enable a button in the toolbar on the selection changed of the RadGridView.

The project is attached to this reply. Give it a try and let me know if it works for you. If not, can you elaborate more on your application set-up?

Regards,
Dinko
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
TabControl
Asked by
Falk
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Share this question
or