I have binded a dropdownlist control to a data view. I am trying to add a
listitem to this already binded control, however, i cannot figure this out.
My code is:
// code to create data view object (dv)
DropDownList1.DataSource = dv;
DropDownList1.DataMember = "vStA";
DropDownList1.DataTextField = "vStAText";
DropDownList1.DataValueField = "vStAId";
if (bNewQuestion)
{
DropDownList1.Items.Insert(0, (new ListItem(" ---- ", "")));
DropDownList1.SelectedIndex = 0;
}
Is it simply not possible to add ListItems to already binded controls? Or is
it my code?
Thanks!