Help with BindingNavigator - editing it's code
Posted on 2006-11-26
hi, screw the ego, i need help. :)
i've been trying for days to come up with a way to parse the child tables of an access relationship hierarchy using VB in VS2k5, and place the concatenated data in a single text box. below is the best i've been able to come up with but there's a minor problem with the event handler. the event below fires before the built-in 'next record' event in the binding navigator. i need the below event to fire after the bindingnavigator has advanced. or maybe i need to edit the event handlers of the bindingnavigator and add the following code to it? basically, what happens is the db advances a record and the text box shows data from the previous record. this is bad 'cause the user could potentially click the Add button to add the data to an existing record and end-up adding it to the wrong one.
any help would be SO appreciated. thanks.
Private Sub BindingNavigator1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigator1.Click
Dim drv As DataRowView
Dim s As String = ""
For Each drv In AddressesBindingSource
s &= drv("Addr1").ToString() & " "
s &= drv("Addr2").ToString() & " "
s &= drv("city").ToString() & ControlChars.CrLf
Textbox1.Text = s