Dropdown comes as disabled

4 posts, 0 answers
  1. Nikunj
    Nikunj avatar
    2 posts
    Member since:
    Jan 2014

    Posted 02 Jan 2014 Link to this post

    Hi,

    I am having a  very strange issue. I am getting drop down as disabled only. Don't know why.

    I have simply right down below code, and binding it from database
        <telerik:RadDropDownList ID="ddlChangeRole" runat="server"    AutoPostBack="true" Skin="Web20">
                                   </telerik:RadDropDownList>

    So, can i have a solution for the same at earliest?

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 02 Jan 2014 Link to this post

    Hi Nikunj,

    Unfortunately I couldn't replicate the issue at my end. Please have a look into the sample code snippet which works fine at my end. As far as I know there is no such issue with RadDropDownList. Please provide your full code if it doesn't help.

    ASPX:
    <telerik:RadDropDownList ID="ddlChangeRole" runat="server" AutoPostBack="true" Skin="Web20">
    </telerik:RadDropDownList>

    C#:
    protected void Page_Load(object sender, EventArgs e)
    {
        ddlChangeRole.DataSourceID = "SqlDataSource1";
        ddlChangeRole.DataTextField = "Cityname";
        ddlChangeRole.DataValueField = "Cityname";
        ddlChangeRole.DataBind();
    }

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nikunj
    Nikunj avatar
    2 posts
    Member since:
    Jan 2014

    Posted 02 Jan 2014 Link to this post

    Hi,

    Thanks for the response. Please go through below code. Its very strange why i am facing this issue. because its quite simple.

       <telerik:RadDropDownList ID="ddlChangeRole" runat="server" AutoPostBack="true" Skin="Web20" >
                                        </telerik:RadDropDownList>


    DropDownList ddlChangeRole = e.Row.FindControl("ddlChangeRole") as DropDownList;

                    DAL.Login model = e.Row.DataItem as DAL.Login;

                    ddlChangeRole.DataSource = Enum.GetNames(typeof(AppConstants.Roles));
                    ddlChangeRole.DataBind();


  5. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 06 Jan 2014 Link to this post

    Hello Nikunj,

    Such behavior of the control, might arise when there is a JavaScript error on the page. Please make sure that there are none.

    Regards,
    Nencho
    Telerik
    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 the blog feed now.
Back to Top