Solved

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

Posted on 2009-04-02
2
1,044 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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AutoIncrement column based of FK 11 56
ASP.NET (VB) return a record 2 40
Need syntax help building hyperlink 2 27
troubleshoot a python script 8 25
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

828 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