I'm having issue with my dropdownlist after I
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx
For example the
DataBind
and then I use the dropdownlist.Items.Insert(0,"Testing") doesn't show up in my DataGrid.http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx
For example the
EmployeeDetails
CS.ascx.cs in the
protected void EmployeeDetails_DataBinding(object sender, System.EventArgs e)
{
ArrayList tocs = new ArrayList(new string[] { "Dr.", "Mr.", "Mrs.", "Ms." });
ddlTOC.DataSource = tocs;
ddlTOC.DataBind();
//issue here
ddlTOC.Items.Insert(0,"Testing");
// or ddlTOC.Items.Insert(0,"Please select Title");
object tocValue = DataBinder.Eval(DataItem, "TitleOfCourtesy");
if (tocValue == DBNull.Value)
{
tocValue = "Mrs.";
}
ddlTOC.SelectedIndex = tocs.IndexOf((string)tocValue);
ddlTOC.DataSource = null;
}