Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
plz Help me my combox not clear & reset After Save the from.
Posted
Comments
Krunal Rohit 27-Oct-15 2:15am    
Elaborate your question more.

-KR

If you want to clear the current selection, but leave all of the items in the list, you can use:
C#
ComboBox1.SelectedIndex = -1;


If you want to clear the combobox you can try
C#
ComboBox1.Items.Clear();

Or if you have binding then
C#
ComboBox1.DataSource=null;
 
Share this answer
 
Hi, after saving data just change your combobox selected index to -1
like
C#
combobox.SelectedIndex = -1;
 
Share this answer
 
First have to one blank value in your combobox. After save you need to assign blank value or blank value index
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900