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

Dropdown comes as disabled

3 Answers 44 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Nikunj
Top achievements
Rank 1
Nikunj asked on 02 Jan 2014, 07:22 AM
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?

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 02 Jan 2014, 08:55 AM
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.
0
Nikunj
Top achievements
Rank 1
answered on 02 Jan 2014, 12:21 PM
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();


0
Nencho
Telerik team
answered on 06 Jan 2014, 02:49 PM
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.
Tags
DropDownList
Asked by
Nikunj
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Nikunj
Top achievements
Rank 1
Nencho
Telerik team
Share this question
or