StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
Business Objects and Data Access (How do I?)
»
Pass a Value to a Child Form
Pass a Value to a Child Form
Post Reply
Like
0
Pass a Value to a Child Form
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Terry Bottorff
Terry Bottorff
posted 13 Years Ago
ANSWER
Topic Details
Share Topic
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
)
Reply
Like
0
Teddy Jensen
Teddy Jensen
posted 13 Years Ago
ANSWER
Post Details
Share Post
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
Reply
Like
0
Terry Bottorff
Terry Bottorff
posted 13 Years Ago
ANSWER
Post Details
Share Post
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.
Reply
Like
0
Terry Bottorff
Terry Bottorff
posted 13 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 448,
Visits: 12K
Yes Sir, right on. It worked like a charm.
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search