Pass a Value to a Child Form


Author
Message
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Yes Sir, right on. It worked like a charm.
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Thank you so much. Exactly what I was looking for. I searched for 'sending a parameter' and never got this hit.
Perfect. Thank you.
Teddy Jensen
Teddy Jensen
StrataFrame Novice (118 reputation)StrataFrame Novice (118 reputation)StrataFrame Novice (118 reputation)StrataFrame Novice (118 reputation)StrataFrame Novice (118 reputation)StrataFrame Novice (118 reputation)StrataFrame Novice (118 reputation)StrataFrame Novice (118 reputation)StrataFrame Novice (118 reputation)
Group: StrataFrame Users
Posts: 52, Visits: 8K
Hi Terry,

You should use the childform constructor to pass over a value.

See this: http://forum.strataframe.net/Topic21120.aspx?Keywords=childform+constructor#bm21122

/Teddy
Edited 13 Years Ago by Teddy Jensen
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
I select a record in my parent table with a browse dialog. I then click an edit button to load a child form using a childformdialog.
That all works fine. I am trying to pass the name field from my contestantsbo to my child form just for information on my child form by putting the name in a label on my child form.
This is the code I am using on my parent form.

   Private Sub btneditdata_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btneditdata.Click
        'Me.ChildFormDialog1.ShowDialog()
        Dim frm As childform = New childform
        frm._cnames = Me._cname

        If Me.ChildFormDialog1.ShowDialog = System.Windows.Forms.DialogResult.OK Then
            SrswtdPointsBO1.Save()
        Else
            SrswtdPointsBO1.Undo(MicroFour.StrataFrame.Business.BusinessUndoType.AllRows)
        End If
    End Sub

    Private ReadOnly Property _cname() As String
        Get
            Return Me.ContestantsBO1.InvertedName
        End Get
    End Property

This is the code I am using on my child form.


    Friend WriteOnly Property _cnames() As String
        Set(ByVal value As String)
            Label6.Text = value
        End Set
    End Property

I put a break point on this line Label6.Text = value and 'value' has the exact info I want to display But it does not show up on the label on my form.

Please see attached picture of my child form.
Attachments
childform.PNG (91 views, 36.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search