Accessing Controls Inside Templates of ControlGroups or ContextualTabGroup

2 posts, 0 answers
  1. Michael
    Michael avatar
    1 posts
    Member since:
    Nov 2011

    Posted 21 Oct 2012 Link to this post

    Hi members,
    i am still new in testing telerik great controls and one of my favourites is the RibbonBar-Control.
    I can follow the example "Find the RadComboBox server sde" at, but dont know, how to access controls, when they are
    a) in a RibbonBarContextualTabGroup
    b) in a RibbonBarControlGroup

    The solution (as described in the upper link) with:
    Dim tab2 As RibbonBarTab = RadRibbonBar1.FindTabByValue("Tab2")
    Dim combobox1 As RadComboBox = DirectCast(tab2.Groups(0).Items(0).FindControl("RadComboBox1"), RadComboBox)

    doesn't work, when the control is in a RibbonBarContextualTabGroup or RibbonBarControlGroup.

    Thanks for any help!!!

  2. Kate
    Kate avatar
    1898 posts

    Posted 25 Oct 2012 Link to this post

    Hi Michael,

    Using the indexes of the different ContextualTabGroup and Tabs, you can easily access the desired one. For instance using the code below (in C#) you can get access to the second tab in the first ContextualTabGroup and change its text property:
    RadRibbonbar1.ContextualTabGroups[0].Tabs[1].Text = "NewText";

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top