RadNumericTextBox and asp:DropDownList

2 posts, 0 answers
  1. Borislava
    Borislava avatar
    15 posts
    Member since:
    Oct 2012

    Posted 05 Dec 2013 Link to this post

    I have RadNumericTextBox and asp:DropDownList. How can I implement the following:
    If RadNumericTextBox.value empty or 0 set asp:DropDownList enable=true
    else asp:DropDownList enable=false without postback?

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 05 Dec 2013 Link to this post

    Hi Borislava,

    Please have a look into the following code snippet to Enable/Disable the DropDownList based on the value of RadNumericTextBox.

    <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" ClientEvents-OnValueChanged="OnValueChanged">
    <asp:DropDownList ID="DropDownList1" runat="server">
        <asp:ListItem Text="Item1">
        <asp:ListItem Text="Item2">

    <script type="text/javascript">
        function OnValueChanged(sender, args) {
            if (args.get_newValue() != "0") {
                var dropdownlist = document.getElementById("DropDownList1");
                dropdownlist.disabled = true;

Back to Top