?
Solved

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

Posted on 2009-04-02
2
Medium Priority
?
1,059 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 2000 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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…
Progress

752 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