G
Grant Merwitz
How do you unbind one of these web controls.
I have a drop down list that based on another drop down list selection will
be databouns
private void BindDD2(int id)
{
DD2.DataSource = MyClass.GetList2(id);
DD2.DataBind();
}
Now, if i want to reset this drop down back to its pre bound state, how
would i do this.
I've tried:
1)
DD2.DataSource = null; //didn't work
2)
foreach(ListItem l in DD2.Items)
DD2.Items.Remoce(l); //also don't work
3)
DataSet ds = new DataSet();
DD2.DataSource = ds;
DD2.DataBind(); //this throws an error.
So, any ideas
TIA
I have a drop down list that based on another drop down list selection will
be databouns
private void BindDD2(int id)
{
DD2.DataSource = MyClass.GetList2(id);
DD2.DataBind();
}
Now, if i want to reset this drop down back to its pre bound state, how
would i do this.
I've tried:
1)
DD2.DataSource = null; //didn't work
2)
foreach(ListItem l in DD2.Items)
DD2.Items.Remoce(l); //also don't work
3)
DataSet ds = new DataSet();
DD2.DataSource = ds;
DD2.DataBind(); //this throws an error.
So, any ideas
TIA