View Single Post
  #4 (permalink)  
Old August 27th, 2004, 08:35 AM
gdbjohnson gdbjohnson is offline
Registered User
 
Join Date: Aug 2004
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I believe I have set up the bindings correctly. I have been able to increment through my result set fine. The problem lies in the following:

when the contact changes the following code executes:

Code:
dsContact.Tables["Address"].DefaultView.RowFilter = "AddressID = '" + dr["AddressID"].ToString() + "'";

this.BindingContext[dvContact, "Address"].Position = 0;
I find that the rowfilter works. When I check the Current record visible from the dataview, the city is "Toronto", but the TextField will continue to display "New York" from the previous Address record. The binding value does not update after I filter the dataset.

How can I get this to update properly?

This is how I set up the databinding:
Code:
txtCity.DataBindings.Add("Text", dvContact, "Address.City");
where dvContact is a DataViewManager built from dsContact which is my DataSet object.

Thanks in advance for your help.

-g

Reply With Quote