Access Controls in same TabItem

2 posts, 0 answers
  1. Falk
    Falk avatar
    1 posts
    Member since:
    Sep 2008

    Posted 17 Jun 2018 Link to this post

    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?

  2. Dinko
    Dinko avatar
    1114 posts

    Posted 20 Jun 2018 Link to this post

    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?

    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.
Back to Top