dropdownlist loding value automatically

2 posts, 0 answers
  1. Gokul
    Gokul avatar
    11 posts
    Member since:
    Apr 2013

    Posted 26 Apr 2013 Link to this post

    i have two dropdownlist in that one dropdownlist connected with stored procedure it contains data textfield is cellname and data valuefield is cellid based on cellid the second dropdownlist displays zone name.  in second dropdownlist contains list of values. after selecting the value and button click event performed. if button clicked, default first value is loaded.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 08 May 2013 Link to this post

    Hi Gokul,

    I guess you want to display the DefaultMessage of the second RadDropDownList on button click. Please check the following C# code I tried which works fine at my end.

    <telerik:RadDropDownList ID="RadDropDownList1" runat="server" DefaultMessage="Please Select">
            <telerik:DropDownListItem runat="server" Text="Item 1" />
            <telerik:DropDownListItem runat="server" Text="Item 2" />
            <telerik:DropDownListItem runat="server" Text="Item 3" />
    <asp:Button ID="Button1" runat="server" Text="Clear" OnClick="Button1_Click" />

    protected void Button1_Click(object sender, EventArgs e)
        RadDropDownList1.SelectedIndex = -1;

  3. DevCraft R3 2016 release webinar banner
Back to Top