Edit this page

Finding Embedded RadComboBox on the Client

Consider the following scenario:

Telerik RadComboBox is embedded in Telerik RadMenu and you need to find the client-side instance of the combobox control:

<telerik:radmenu id="RadMenu1" runat="server">    
<CollapseAnimation Duration="200" Type="OutQuint" />    
    <telerik:RadMenuItem runat="server" Text="Root RadMenuItem1">            
        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1">                    
                <telerik:RadComboBox RenderMode="Lightweight" ID="RadComboBox1" runat="server">                            
                    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" />                                
                    <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" />                            

To find the client-side instance of the combobox control you can use one of the following approaches:

var combo = $find('<%= RadMenu1.Items[0].Items[0].FindControl("RadComboBox1").ClientID %>');


var menu = $find("<%= RadMenu1.ClientID %>"); 
var combo = menu.get_items().getItem(0).findControl("RadComboBox1");


var combo = Telerik.Web.UI.RadComboBox.ComboBoxes[0];

See Also

Is this article helpful? No Yes
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article