RadComboBox client properties not hooked up

4 posts, 0 answers
  1. Marbry
    Marbry avatar
    123 posts
    Member since:
    Aug 2012

    Posted 21 Sep 2011 Link to this post

    When I enable a RadComboBox on the client side like comboBox._enabled = true;, and the AllowCustomText property is already true, the input element should also be enabled.  But it isn't.

    I have to make a separate check and call like so.

    if (comboBox._allowCustomText == true)
        comboBox._inputDomElement.disabled = false;
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 22 Sep 2011 Link to this post

    Hello Marbry,

    The folowing client side code worked as expected at my end.

    Client Side:
    <asp:Button ID="Button1" runat="server" OnClientClick="Open();return false;" />
    <script type="text/javascript">
        function Open()
            var comboBox = $find('<%=RadComboBox1.ClientID %>');
            if (comboBox._allowCustomText == true)
                comboBox._inputDomElement.disabled = false;

  3. Marbry
    Marbry avatar
    123 posts
    Member since:
    Aug 2012

    Posted 22 Sep 2011 Link to this post

    Yep, I know it does.  My point was just that it shouldn't really take a separate call.

    That's been the source of a lot of confusion on a number of things, with this decoupling of elements of a single component, and not knowing for sure whether something needs to be set or handled for the parent wrapper or something within it.  Certainly on the client side, but also to some extent on the server.

    Examples do not make for documentation, although they're good to have with it, and documentation is very weak for most things.
  4. Ivana
    Ivana avatar
    657 posts

    Posted 26 Sep 2011 Link to this post

    Hello Marbry,

    You could use the client-side method enable() of the RadComboBox object to  get the desired functionality without having to set the disabled property of the RadComboBox's input field to "false" explicitly.

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

    For more information about the RadComboBox's client-side object you could refer to the following help article at our website: Client-Side Programing: RadComboBox Object.

    Hope this helps.

    Kind regards,
    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