Updating datagrids from other windows

bloukewer

Well-known member
Joined
Jul 2, 2004
Messages
88
Programming Experience
3-5
I have a datagrid on my main-window (which is always active until the appliction terminates). Is it possible to update & refresh those datagrids from other forms (which are activated from buttons clicked on the main-window). Here is some pseudo-code to explain how I activated the other forms:

Eventhandler btnAddClicked( .........)
dim frmAdd as new frmAdd
frmadd.showDialog()
end Sub

I tried setting the main-window as a mdi-container, but alas, unexplained erroneous behaviour strikes again! I'm sure some little green men have been doing experiments on my comp, thus the weird behaviour.

Anyways, as always, thanks for any replies.

PS. I'm actually not wondering how to update and refresh a datagrid, the problem is doing it from the "child" forms.
 

levyuk

Well-known member
Joined
Jun 7, 2004
Messages
313
Location
Wales, UK
Programming Experience
3-5
in the child form you could try something like this.

Dim formMain as new formMain
formMain.Datagrid.dosomething

or if you are using a button/sub/function to do the update im sure you could call it in the same way i.e.

Dim formMain as new formMain
formMain.UpdateGrid()
 

bloukewer

Well-known member
Joined
Jul 2, 2004
Messages
88
Programming Experience
3-5
Whoa!

Oh man! That link you gave is excellent!
There's a bunch of stuff there that is VERY usefull! Great stuff, PASZT!
- Remind me to send you some whiskey or a fruit-basket or something when I visit your country.
 
Top Bottom