i am working on windows form application..
i have two combo box..i changed my combo box drop down style property to DropDownList
after saving the data i want to clear item in the combo box..so i given code like this:
CmbDepartment.Text = "";
cmbvisitpurpose.Text = "";
but this is not clearing the selected item from my combobox..so i changed code like this:
cmbvisitpurpose.Items.RemoveAt(cmbvisitpurpose.SelectedIndex = -1)
CmbDepartment.Items.RemoveAt(CmbDepartment.SelectedIndex = -1)
this is permenantly removing particular item from my combobox..if i want to get all item in the combbox..agian i want to load the page..i want to just clear the selected item.. how i can do this?