Enable/Disable combobox using javascript

3 posts, 0 answers
  1. prayag ganoje
    prayag ganoje avatar
    127 posts
    Member since:
    Feb 2010

    Posted 19 Mar 2010 Link to this post

    Hello,

    How can i enable / disable combobox using javascript ?

    Prayag
  2. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 19 Mar 2010 Link to this post

    Just call the enable or disable functions of the RadComboBox object.

    Like so:

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

    I hope that helps.
  3. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 19 Mar 2010 Link to this post

    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.
Back to Top