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

Adding a new combobox after selecting an item

2 Answers 99 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
TANSERI
Top achievements
Rank 1
TANSERI asked on 02 Feb 2011, 12:42 PM
Hi,

I have created a combobox load on demand and I want to add an another combox box when I select an item of the first combo box. The second combo box must use the selected value of the first combo box to execute an SQL query and to retrieve items.


When I select an item of the first combo box, the second combobox is added, but when I open it, a popup is displayed.

Here is the code of my issue.

Thanks a lot.


protected void Page_Load(object sender, EventArgs e)
   {
       ComboBoxLoadOnDemand cbx = new ComboBoxLoadOnDemand();
       cbx.TableName = "ddl_report_collaborator";
       cbx.DataTextField = "text_ddl";
       cbx.DataValueField = "value_ddl";
       cbx.Height = Unit.Pixel(250);
       cbx.Width = Unit.Pixel(200);
       cbx.NbItemsRequested = 50;
       cbx.AutoPostBack = true;
       cbx.ShowMoreResultsBox = true;
       this.form1.Controls.Add(cbx);
       cbx.SelectedIndexChanged += new Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventHandler(cbx_SelectedIndexChanged);
        
        
   }
   void cbx_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
   {
       ComboBoxLoadOnDemand cbx2 = new ComboBoxLoadOnDemand();
       cbx2.TableName = "ddl_report_collaborator";
       cbx2.DataTextField = "text_ddl";
       cbx2.DataValueField = "value_ddl";
       cbx2.Height = Unit.Pixel(250);
       cbx2.Width = Unit.Pixel(200);
       cbx2.NbItemsRequested = 50;
       cbx2.ShowMoreResultsBox = true;
       this.form1.Controls.Add(cbx2);
   }

2 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 04 Feb 2011, 12:11 PM
Hello TANSERI,

I've tried to reproduce this issue but to no avail. Could you please open a support ticket and attach a simple page demonstrating the issue there? Thanks

Greetings,
Yana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
TANSERI
Top achievements
Rank 1
answered on 07 Feb 2011, 12:20 PM
Thanks for answering so fast. I found an another way to avoid my issue.
Tags
ComboBox
Asked by
TANSERI
Top achievements
Rank 1
Answers by
Yana
Telerik team
TANSERI
Top achievements
Rank 1
Share this question
or