Client Side API - Find a RadComboBox Embedded in a User Control

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

    Posted 01 Nov 2013 Link to this post

    I'm trying to find a RadComboBox on my ASP.Net form using the preferred syntax:
    var combo = $find("<%= RadComboBox1.ClientID %>");

    However, the combox box is actually embedded in a user control.  How can I reach that RadComboBox using the above javascript function?

    This doesn't seem to work:

    var combo = $find("<%= MyUserControl_RadComboBox1.ClientID %>");

    Where MyUserControl_RadComboBox1 is the unique id in the rendered markup.

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 03 Nov 2013 Link to this post

    Hi Brian,

    Please have a look into the following code snippet to access a user control RadCombobox on Client Side.

    <uc1:WebUserControl ID="WebUserControl1" runat="server" />

    <script type="text/javascript">
        function pageLoad() {
            var combo = $find('<% =WebUserControl1.RadComboBox1ClientID %>');

    <telerik:RadComboBox ID="RadComboBox1" runat="server">
            <telerik:RadComboBoxItem Text="Item1" runat="server" />
            <telerik:RadComboBoxItem Text="Item2" runat="server" />

    ASCX C#:
    public string RadComboBox1ClientID
            return this.RadComboBox1.ClientID;

Back to Top