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

RadComboBox client properties not hooked up

3 Answers 62 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Marbry
Top achievements
Rank 1
Marbry asked on 21 Sep 2011, 08:11 PM
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;

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 22 Sep 2011, 07:08 AM
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 %>');
        comboBox.set_enabled(true);
        if (comboBox._allowCustomText == true)
            comboBox._inputDomElement.disabled = false;
    }

Thanks,
Shinu.
0
Marbry
Top achievements
Rank 1
answered on 22 Sep 2011, 02:53 PM
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.
0
Ivana
Telerik team
answered on 26 Sep 2011, 02:33 PM
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.

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

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,
Ivana
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
ComboBox
Asked by
Marbry
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Marbry
Top achievements
Rank 1
Ivana
Telerik team
Share this question
or