Results 1 to 2 of 2

Thread: passing data from wpf parent form to child form

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2006
    Posts
    176

    passing data from wpf parent form to child form

    Hi All.
    In my WPF Form1 I have TextBlock1 that fill from AddressTableAdapter. To edit address user must click EditButton to open Form2 to perform changes. My problem is passing data to Form2 from Form1. In Form2 I have 3 TextBoxes Street, City, Zip, and StateComboBox.
    I try to code in Loaded procedure of Form2 like this and got error message:
    Code:
    Private Sub Form2Detail_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
         Me.AddressTableAdapter.Fill(Me.AbcDataSet.Address)
         Me.StreetTextBox = IIf(IsDBNull(AbcDataSet.Address.StreetColumn), "", AbcDataSet.Address.StreetColumn))
         Me.StateComboBox = IIf(IsDBNull(AbcDataSet.Address.StateColumn), 0, AbcDataSet.Address.StateColumn))
    End Sub
    Thanks.
    Last edited by eugz; Jan 27th, 2010 at 08:05 PM.

  2. #2
    Frenzied Member toecutter's Avatar
    Join Date
    Apr 2006
    Location
    Brisbane, Australia
    Posts
    1,160

    Re: passing data from wpf parent form to child form

    May i suggest asking a Mod to move your thread to the WPF forums, may get more attention there.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width