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

Accessing Controls Inside Templates of ControlGroups or ContextualTabGroup

1 Answer 39 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 21 Oct 2012, 01:49 PM
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 http://www.telerik.com/help/aspnet-ajax/ribbonbar-templates-accessing-controls-server-side.html, but dont know, how to access controls, when they are
a) in a RibbonBarContextualTabGroup
or
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!!!
Michael

1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 25 Oct 2012, 09:46 AM
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";

Regards,
Kate
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.
Tags
RibbonBar
Asked by
Michael
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or