Hi,
After using telerik RadGrid Edit form. Which within our custom user control contains a ComboBox (Data Source: DataTable, AppendItemDataBound: True). It appears that the combobox has double bind the value. I have attached a sample code which duplicated the scenario im describing.
the above code is invoked one during Page Load (userControl, that is invoked by radGrid). however the behaviour of having appenddatabound is for us to Add "Select One" item is desired. Is there a reason why its duplicating ?
Best Regards,
Adrian
After using telerik RadGrid Edit form. Which within our custom user control contains a ComboBox (Data Source: DataTable, AppendItemDataBound: True). It appears that the combobox has double bind the value. I have attached a sample code which duplicated the scenario im describing.
ddl.AppendDataBoundItems =
true
;
ddl.Items.Add(
new
ListItem(
"select one"
,
""
));
ddl.DataTextField =
"Value"
;
ddl.DataValueField =
"ID"
;
ddl.DataSource = Session[
"DataTableSource"
];
ddl.DataBind();
RadComboTest.AppendDataBoundItems =
true
;
RadComboTest.Items.Add(
new
RadComboBoxItem(
"select one"
,
""
));
RadComboTest.DataTextField =
"Value"
;
RadComboTest.DataValueField =
"ID"
;
RadComboTest.DataSource = Session[
"DataTableSource"
];
RadComboTest.DataBind();
the above code is invoked one during Page Load (userControl, that is invoked by radGrid). however the behaviour of having appenddatabound is for us to Add "Select One" item is desired. Is there a reason why its duplicating ?
Best Regards,
Adrian