Thank you. This is an interesting approach. I did try it
and got a message that an mdiparent can't be a parent and
also a child. I will experiment with this. Here is the
truth. I am taking a class in ADO.net using VB.net (or
C#). The instructor has a solution, but I won't know it
(until it is too late

. The only thing I can really
think of to evoke something in the parent form would be to
show the childform as a dialog form. But I tried that
only to get the message that only top level forms can be
showed as dialog. In the meantime, I can always read the
contents of the childform from a menu on the parent form.
My instructions are not completely clear (to me) but the
idea is that I add data to a dataset on the parent form
but by clicking a button on the childform and on the
update (from the childform) the datagrid gets refreshed
(also from the button click on the childform).
Adda
>-----Original Message-----
>Hi Adda,
>
>I was curious if this would work.
>
>I think that it does as you wanted?
>
>(Most code is to build the sample table)
>
>Cor
>
>\\\Mdiform
> Private Sub FormMdi_Load(ByVal _
> sender As Object, ByVal e As System.EventArgs) _
> Handles MyBase.Load
> dt.CreateTable()
> Dim frm1 As New Form1
> frm1.MdiParent = Me
> frm1.Show()
> Dim frm2 As New Form2
> frm2.MdiParent = Me
> frm2.Show()
> AddHandler dt.dvchanged, AddressOf myrefresh
>End Sub
>Private Sub myrefresh()
> Me.Refresh()
>End Sub
>///
>\\\2 forms form1 and form2 both the same
> Private Sub Form1_Load(ByVal sender As Object, _
> ByVal e As System.EventArgs) Handles MyBase.Load
> DataGrid1.DataSource = dt.dv
>End Sub
>///
>\\\Class to build a sample table as and to set the events
>Public Class dt
> Public Shared WithEvents dv As DataView
> Public Shared Event dvchanged()
> Public Shared Sub CreateTable()
> Dim dt As New DataTable("Sample")
> For i As Integer = 0 To 7
> Dim dc As New DataColumn(Chr(i + 65))
> dt.Columns.Add(dc)
> Next
> For i As Integer = 0 To 8
> dt.Rows.Add(dt.NewRow)
> For y As Integer = 0 To dt.Columns.Count - 1
> dt.Rows(i)(y) = (Chr(i + 48))
> Next
> Next
> dv = New DataView(dt)
>End Sub
>Private Shared Sub dv_ListChanged(ByVal sender _
> As Object, ByVal e As
System.ComponentModel.ListChangedEventArgs) _
> Handles dv.ListChanged
> RaiseEvent dvchanged()
> End Sub
>End Class
>///
>
>
>.
>