954,517 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Passing Object of Type Structure Through A Dialog Call

I have the following structure defined in a given form called transoverride.vb


Public Structure structTransoverride
Public Account_Name As String
End Structure

at the top of my class (TransOverride) I have defined the following:

Public TransOverrideStruct
Public objTransoverride As structTransoverride



I have a datagrid that when I select modify button on a row the following routine comes up:

Public Sub DoModify()

Dim dTable As DataTable = Me.DataGrid1.DataSource
Dim bm As BindingManagerBase = Me.DataGrid1.BindingContext(Me.DataGrid1.DataSource, Me.DataGrid1.DataMember)
Dim dRow As DataRow = CType(bm.Current, DataRowView).Row
Me.lbNumRec.Text = Me.DsTransOverride1.Tables(0).Rows.Count.ToString()

Dim cEditTransOverride As New EditTransOverride
cEditTransOverride.ShowDialog(TransOverrideStruct)


Me.DsTransOverride1.Tables(0).Clear()
Me.SqlDataAdapter1.Fill(Me.DsTransOverride1)
Me.DataGrid1.Refresh()

End Sub

Question? How do I pass my structure to the dialog form class(EditTransOverride) so I can display/edit

the values in textboxes on the dialog form. Tell me what do I need to define in my dialog form

EditTransOverride.vb and please be specific. I need this urgently. I need to know every step in this

process. Thank you for your help.

mcupryk
Newbie Poster
14 posts since Sep 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You