Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3940110
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:22:45+00:00 2026-05-20T00:22:45+00:00

I have a parent window which has a ListView that is bound to an

  • 0

I have a parent window which has a ListView that is bound to an ObservableCollection that gets it’s data from an XML file. On the parent window, I have an add button that opens a opens a Modal Window (form2.ShowDialog(), I think this is a Modal window).

In the child window I have a few text fields and an add button, the user enters data for a new record and clicks the Add button and the XML file is updated with the new record.

What I am seeking to do is when the child window is closed that the ListView in the parent window is refreshed to show the new record.

When I am updating the XML file from the child window, I am doing this directly to the XML file, should I be adding the data to the file in some other manner which would raise an event on the ObservableCollection?

I was heading down the path of adding an event handler to the add button on the parent window and attempt to force a re-read of the XML file, but I cannot figure out how to achieve this, below is what I have done so far.

form1.xaml.vb:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
        Dim frm As New newEmergencyContact
        AddHandler frm.Closed, AddressOf refresh_EmContacts
        frm.ShowDialog()
    End Sub
    Private Sub refresh_EmContacts()

    End Sub

I cannot workout what should go into the refresh_EmContacts sub, do I need to call some kind of ObservableCollection event handler to notify it that it has been updated and to do the re-read?

Any assistance would be greatly appreciated.

Matt

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T00:22:45+00:00Added an answer on May 20, 2026 at 12:22 am

    You might be better off updating the ObservableCollection directly with the new item, and then if you wish to persist the change to the XML file at that point, you could subscribe to the ObservableCollection’s CollectionChanged event and you can inspect the event args passed to your handler to get information about the item added.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a parent window in which a push-button's click event function has the
I have a parent object which has a one to many relationship with an
I have a window which has a custom NSView and has a bottom bar
I have a Windos::Forms::GroupBox which contains a Windows::Forms::ListView . When I add items, I
I have a window which contains a Frame which references a 'home' page that
Is it possible to close parent window in Firefox 2.0 using JavaScript. I have
In my child window I have $('#opfile').addOption(someval,sometext); Problem is #opfile is an a parent
There has to be a simple explanation for this. I have a parent <div>
I have a need to close a parent form from within child form from
I have an IList that contains items ( parent first ), they need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.