Refreshing parent form

dotnot

Member
Joined
Nov 24, 2004
Messages
6
Programming Experience
Beginner
Probably a daft question, but I'm new to this.

I'm having trouble refreshing a grid on a parent form when udpates to a child form are made.
I have a grid on my parent form and when an item is double clicked, it opens the child form where the user can update or add new items. I have a grid refresh function in the main form. Is there a way to call the refresh every time the user clicks save on the child form without moving focus or closing the child form??
thanks.
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
in a module make a global variable for the parent form

then in the load event of the parent form
global parent form variable = Me

then make a public sub (actually it should be a Friend sub) for the datagrid refresh thingy

now on the child form just call global parent form variable.friendsub and that'll execute the sub on the parent form just like you want :)
 

dotnot

Member
Joined
Nov 24, 2004
Messages
6
Programming Experience
Beginner
Thanks for that JuggaloBrotha. That was just what I was looking for.
 
Top Bottom