Solved

Add new item to ComboBox in WinForm vb.net and automatic refresh the box.

Posted on 2009-04-02
2
1,029 Views
Last Modified: 2013-11-26
I'm building a WinForm in VIsual Studio 2008 and I've the following question.

On the form I've a ComboBox Customer. But a new customer isn't in my dataset / database so I've to open a new form AddCustomer and when I'm ready and close the form the ComboBox must be refreshed / fill agian. How can I do this easy?

If it's posible I want to used the keydown function to open de new form.

Hope somebody can help me.

Bart Jan
0
Comment
Question by:prinsbj
2 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 24057240
So if I understand it correctly: You have a mainform which holds a combobox with all your customers.
When one customer is not in there, you open a new form and create a new customer. After adding this to the database, you close this form and return to the mainform ?

Can you show how you call your "new customer" form ? Do you call it with showdialog ?
If so, you can refresh the box after this statement
0
 

Author Closing Comment

by:prinsbj
ID: 31566044
Hello Dhaest,

This was what I needed. I used the .show() function and not .showdialog()

THANK A LOT

Bart Jan
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now