New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

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:

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

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

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

or

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

or

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

See Also

In this article
See Also
Not finding the help you need?
Contact Support