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.
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);
}