473,506 Members | 11,491 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Basic Question: Update Parent Window

I have a form that shows a list of items.

I click a button which opens a child form. On the child form i can create
new items.

How can I refresh the list of items on the parent form ?

I'm not sure how i can trigger an event which will call the refresh on the
parent.

Thanks in advance.
Nov 17 '05 #1
1 1170
Jonathan,

The point is that child form must have a reference to know what form is the
parent form.

You can do that, by example, setting a parameter with the parent form in the
constructor or providing a property in the child form where you could set
this reference. Example:

// Constructor
private YourParentForm mParentForm;
public ChildForm(YourParentForm myParentForm)
{
mParentForm = myParentForm;
}

// or Property
public YourParentForm ParentForm
{ set {mParentForm = value;} }

So, in the child form, you can perform any method provided by the Parent Form.

mParentForm.UpdateSomething();

Cheers,

Francisco.

"Jonathan Taylor" wrote:
I have a form that shows a list of items.

I click a button which opens a child form. On the child form i can create
new items.

How can I refresh the list of items on the parent form ?

I'm not sure how i can trigger an event which will call the refresh on the
parent.

Thanks in advance.

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1379
by: mahesh | last post by:
Hi all, I have a doubt with OOAD and Dialogs. I have a Dialog Class. tkSimple.py It contains a class body as below. Now I am calling the tkSimple.py in another python program and using the...
2
2875
by: Ken Fine | last post by:
I'm trying to get DNS set up properly on my box under Win2kAS. I'm a DNS newbie, so please go easy. :) Everything appears to be (mostly) there, with one significant annoying exception. I've set...
38
5002
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
6
9846
by: mkobus | last post by:
Im relatively new, so please be patient with me... I need to update a parent .aspx screen from a popup and close the popup. Normally I would use...
12
1902
by: Mark Fox | last post by:
Hello, I am attempting to do something very simple. I have a page MainPage.aspx and a popup window Popup.aspx. When users click on the linkbutton in the popup window I am looking to do some...
6
7252
by: | last post by:
Hi, I'm steel trying to read and update my XML file with Visual Basic Express but i am unable to find the right way to read my xml file and update it if neccessary... Here is my problem :...
3
2958
by: joshdw4 | last post by:
I hate to do this, but I've thoroughly exhausted google search. Yes, it's that pesky root window and I have tried withdraw to no avail. I'm assuming this is because of the methods I'm using. I...
2
1111
by: Andy | last post by:
I want to dynamically update a list of elements shown as a checkbox list. A file is used to store the elements, and elements can be added and deleted from the list. The trouble is that the window...
29
3869
Frinavale
by: Frinavale | last post by:
I have 2 FireFox (version 2) browser windows opened. One is the child of the other. When the user is finished with the child window, a method in the parent window is called to refresh a...
0
7308
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7371
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7023
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7479
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5617
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3178
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
410
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.