Passing Object of Type Structure Through A Dialog Call

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2005
Posts: 14
Reputation: mcupryk is an unknown quantity at this point 
Solved Threads: 0
mcupryk mcupryk is offline Offline
Newbie Poster

Passing Object of Type Structure Through A Dialog Call

 
0
  #1
Sep 13th, 2005
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC