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

Enable/Disable combobox using javascript

2 Answers 209 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
prayag ganoje
Top achievements
Rank 1
prayag ganoje asked on 19 Mar 2010, 01:16 PM
Hello,

How can i enable / disable combobox using javascript ?

Prayag

2 Answers, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 19 Mar 2010, 02:10 PM
Just call the enable or disable functions of the RadComboBox object.

Like so:

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

I hope that helps.
0
Kalina
Telerik team
answered on 19 Mar 2010, 02:13 PM
Hello prayag ganoje,

You can disable/enable RadComboBox calling the "disable" or "enable" client side methods.

I made a basic sample for you to illustrate the approach:
<head runat="server">
    <title></title>
    <script type="text/javascript" language="javascript">
        function OnClientLoadHandler(sender) {
            sender.disable();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <telerik:RadComboBox ID="RadComboBox1" runat="server"
            OnClientLoad="OnClientLoadHandler">
            <Items>
                <telerik:RadComboBoxItem Text="item1" Value="1" />
                <telerik:RadComboBoxItem Text="item2" Value="2" />
                <telerik:RadComboBoxItem Text="item3" Value="3" />
            </Items>
        </telerik:RadComboBox>
    </div>
    </form>
</body>

Please find more details about RadComboBox client-side properties and methods here.

Kind regards,
Kalina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ComboBox
Asked by
prayag ganoje
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
Kalina
Telerik team
Share this question
or