|
-
Nov 11th, 2014, 06:21 PM
#15
Re: refresh combobox values after updating its datatable and adapter
 Originally Posted by larrycav
Go back and read your other comment... You said I needed to requery the database again from the combobox.... How else would I do it?
I know exactly what I said. I said that you need to requery the database if you want new data. I certainly didn't say that you need to do it "from the combobox", which isn't what you're doing anyway. I also didn't say that you should keep the old data when you got the new data. I assumed that that went without saying. Apparently not.
First, you have to think about WHEN you need to get new data and handle the appropriate event. You certainly do NOT want to get new data every time the user selects an item so obviously the SelectedIndexChanged event handler of the ComboBox is the wrong place for the code. You also need to clear out the old data before getting the new.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|