944,173 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 3350
  • VB.NET RSS
Sep 13th, 2005
0

Passing Object of Type Structure Through A Dialog Call

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mcupryk is offline Offline
14 posts
since Sep 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Debugging Error
Next Thread in VB.NET Forum Timeline: outlook export code help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC