Solved

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

Posted on 2009-04-02
2
1,055 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Progress

688 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