How to Refill a tableadapter. Updated Datagridview Combobox Values

In my DatagridView I have a combobox with a list of values.
also outside the grid there is a button that opens a form where you can add new values .
i want when i close the form the new values to be added in the datagridview combobox .
the form and the combobox are binded to the same dataset..
LVL 18
John (Yiannis) ToutountzoglouInstructor Multiengine PilotAsked:
Who is Participating?
brandonvmooreConnect With a Mentor Commented:
I really don't use the DGV, but I'll see if I can help you .  I would imagine that there's some kind of method to update or refresh the DGV.  When the new value is added from the popup form, have it also update the DGV on the main form.

Let me know if that helps.
By the way, when you make changes on the popup form:  is the database being update and you just can't figure out how to get the DGV to refresh, or are you even getting the database updated?

Here's a similar post by someone else that may help:
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

John (Yiannis) ToutountzoglouInstructor Multiengine PilotAuthor Commented:
i just want to update only the combobox of the datagridview ...
on the popup form i have an update button tha saves the new data in the dataset.
.keep in mind that the combobox has the same dataset...
if close the dgv and open it again i have the new data in the combobox...but i need to accomplish this at runtime
John (Yiannis) ToutountzoglouInstructor Multiengine PilotAuthor Commented:
i will read it immediatelly
John (Yiannis) ToutountzoglouInstructor Multiengine PilotAuthor Commented:
so what i'va done is the following after closing the popup form.and it works properly.So three lines for three weeks stuck.
thank you for guide me.
plz give me your opinion about doing something like this

Open in new window

Yeah, that looks good to me.  Besides, if it works it works, right?

It might be more ideal if there were a way that you could just update what you needed instead of filling the entire thing again, but as long as performance is ok then I certainly wouldn't which I'm sure it's not then I wouldn't worry about that at all.
John (Yiannis) ToutountzoglouInstructor Multiengine PilotAuthor Commented:
yes it works fine ...
as for the theory of the table adapter i think i can use the function "fill" any time i want without changing the performance ...i am trying to find ,just for knowledge, another way to accomplish this but i can't find a different solution ....thanx for for guiding me...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.