Click here to Skip to main content
16,021,041 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
if to clear a text box is txtfname.text = "" then how about the combobox and the datetimepicker in vb.net?

cboPackage.items.clear it works but how to make the items in combo ox fill again.
Posted
Updated 18-Feb-10 16:29pm
v2

There are several kinds of comboboxes. Which one are you talking about?

I would start with ComboBox.SelectedItem = null or something like that. I Imagine you can do something similar with the DateTimePicker. Of course, you could probably find all your answers with a quick google search.
 
Share this answer
 
Combobox - objCombo.items.Clear()
Datepicker - see here[^].
 
Share this answer
 
If it is not a databound control call ComboBox1.Items.Clear for Combobox
I am not sure whether Datetimepicker has such a property. May be you can set the selected date instead of clearing it.
 
Share this answer
 
Please, I told you once, edit your post, don't post fake answers

'cboPackage.items.clear it works but how to make the items in combo ox fill again.'

You are so cool with your h4ck3r nick and all, but it's clear you know nothing about programming. You should buy a book rather than bringing your most basic questions here. When you empty it, how do you think you fill it again ? You have to run the code that fills it, because whatever you put in there before, you've told it to throw away.
 
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