Hello.
I encounter a problem with the controller [RadDropDownList].
I built a simple table on the server side (code behind) and manually sets the client function [OnClientSelectedIndexChanged] on the controller
[RadDropDownList].
My problem is that my property RadDropDownList.Enabled is always equal to false. I do not understand why ... If I define no client function on [OnClientSelectedIndexChanged] , my property of my control RadDropDownList.Enabled is equal to True.
Do you have any idea why it is impossible to define the client function [OnClientSelectedIndexChanged] without changing the Enabled property? This is boring because users can not use this controller if enable == false..
Thanks a lot !
Here is my code used to build my table with the control [RadDropDownList] .
I encounter a problem with the controller [RadDropDownList].
I built a simple table on the server side (code behind) and manually sets the client function [OnClientSelectedIndexChanged] on the controller
[RadDropDownList].
My problem is that my property RadDropDownList.Enabled is always equal to false. I do not understand why ... If I define no client function on [OnClientSelectedIndexChanged] , my property of my control RadDropDownList.Enabled is equal to True.
Do you have any idea why it is impossible to define the client function [OnClientSelectedIndexChanged] without changing the Enabled property? This is boring because users can not use this controller if enable == false..
Thanks a lot !
Here is my code used to build my table with the control [RadDropDownList] .
for (int a = 0; a < allAudit.GetLength(0); a++){ // ....... int auditID = int.Parse(allAudit[a, 0]); double percent = ((double)countTotalAuditable/(double)countTotal) * 100.0; TableRow row = new TableRow() { BackColor = Color.FromArgb(215, 230, 247) }; TableCell cell_processName = new TableCell() { HorizontalAlign = HorizontalAlign.Left,VerticalAlign = VerticalAlign.Middle }; TableCell cell_date = new TableCell() { HorizontalAlign = HorizontalAlign.Center, VerticalAlign = VerticalAlign.Middle }; TableCell cell_progression = new TableCell() { HorizontalAlign = HorizontalAlign.Center, VerticalAlign = VerticalAlign.Middle }; TableCell cell_responsable = new TableCell() { HorizontalAlign = HorizontalAlign.Center,VerticalAlign = VerticalAlign.Middle }; Label lblProcessName = new Label() { Text = allAudit[a, 1] }; Label lblDate = new Label() { Text = DateTime.Parse(allAudit[a, 3]).ToLongDateString() }; Label lblProgressionAudit = new Label() { Text = percent+" %" }; RadDropDownList droopDownResponsable = new RadDropDownList(); droopDownResponsable.EnableEmbeddedScripts = false; droopDownResponsable.ID = "droopDownResponsable"; droopDownResponsable.ClientIDMode = System.Web.UI.ClientIDMode.Static; droopDownResponsable.OnClientSelectedIndexChanged = "cbx_responsible_SelectedIndexChanged("+auditID+");"; SqlDataSource sourceUserList = new SqlDataSource(ConfigurationManager.ConnectionStrings["SCI2ConnectionString"].ToString(), "SELECT [tblUser].[userID], [UserName] FROM [aspnet_Users] INNER JOIN [tblUser] ON [aspnet_Users].[UserId] = [tblUser].[membershipID]"); droopDownResponsable.DataValueField = "UserID"; droopDownResponsable.DataTextField = "UserName"; droopDownResponsable.DataSource = sourceUserList; droopDownResponsable.DataBind(); foreach (DropDownListItem item in droopDownResponsable.Items) { if (item.Text == allAudit[a, 2]) { item.Selected = true; } } cell_processName.Controls.Add(lblProcessName); cell_date.Controls.Add(lblDate); cell_progression.Controls.Add(lblProgressionAudit); cell_responsable.Controls.Add(droopDownResponsable); row.Cells.Add(cell_processName); row.Cells.Add(new TableCell() { Text = " ", Width = 20 }); row.Cells.Add(cell_date); row.Cells.Add(new TableCell() { Text = " ", Width = 20 }); row.Cells.Add(cell_progression); row.Cells.Add(new TableCell() { Text = " ", Width = 20 }); row.Cells.Add(cell_responsable); tableAuditAdministration.Rows.Add(row); // .......}