Hi,
There is a section called "Creating ItemTemplate/EditItemTemplate of GridTemplateColumn programmatically" in http://www.telerik.com/help/aspnet/grid/grdprogrammaticcreation.html
What I did was to add the following code inside InstantiateIn function
myDropDownList = new DropDownList();
myDropDownList.DataSource = myDataSource;
myDropDownList.DataTextField = "resultLegend";
myDropDownList.DataValueField = "resultOption";
myDropDownList.DataBind();
myDropDownList.Items.FindByValue("C+").Selected = true;
I assigned myDataSource and when I checked myDropDownList.Items, the dropdown list has lists I expected.
But the dropdownlist displays options but the default option is not selected.
Appreciate your help in advance,
Toby
There is a section called "Creating ItemTemplate/EditItemTemplate of GridTemplateColumn programmatically" in http://www.telerik.com/help/aspnet/grid/grdprogrammaticcreation.html
What I did was to add the following code inside InstantiateIn function
myDropDownList = new DropDownList();
myDropDownList.DataSource = myDataSource;
myDropDownList.DataTextField = "resultLegend";
myDropDownList.DataValueField = "resultOption";
myDropDownList.DataBind();
myDropDownList.Items.FindByValue("C+").Selected = true;
I assigned myDataSource and when I checked myDropDownList.Items, the dropdown list has lists I expected.
But the dropdownlist displays options but the default option is not selected.
Appreciate your help in advance,
Toby