I am having great difficulty with some code I have used (found the basic idea on the internet). Basically, I have a tree whose node tags contain a datarow. When a node is selected, the following code uses a dataview to find the index of the row in the underlying datatable and then uses a bindingmanagerbase to change the current position in the datatable. This code seems to work fine - in debug the position changes - but controls that are bound to the underlying datatable do not change their values.
The controls are bound in this way: Me.txtTester.DataBindings.Add("text", mDS.Tables("Address"), "AddressLine1") Here is the code which does the position change: Dim bm As BindingManagerBase = BindingContext(mDS, "Address") Dim view As DataView = New DataView(mDS.Tables("Address")) view.Sort = "AddressID" Dim therow As DataRow = Me.trResidence.SelectedNodes(0).Tag Dim id As Integer = Integer.Parse(therow("AddressID").ToString) bm.Position = view.Find(id) Can someone help me fix this? DC =================================== This list is hosted by DevelopMentorŪ http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com