Hi, I just came in on this discussion...but... Yes, you can bind a specific field on the DataSet to a TextBox. And it can be the same field that you bind to the grid, and you can use BindingContext to keep the two in sync (as was already stated). You might even be able to do the more complex binding you want by using the DataViewManager and a filter on the child table (Orders), and/or multiple BindingContexts/CurrencyManagers.
I'd also be concerned about "batching" updates and your optimistic concurrency conflict resolution strategy. If you are flushing changes from more than one row or more than one table, what do you do if someone else has already changed that row? Or changed 1 row out of 4? Do you update based on DB timestamp, or primary key staying the same, or a stored proc that updates both (all) tables, or an "instead of" trigger over a view, or ??? Bob Beauchemin [EMAIL PROTECTED] -----Original Message----- From: Bob Edwards [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002 8:08 AM To: [EMAIL PROTECTED] Subject: Re: [DOTNET] updating dataset and dataform I don't thnk this is possible. Let me tell you just a bit more about the design. I have two tables: call them customers and orders. Customers is the parent, orders the child. When you click on the plus in the grid, you see all the orders for the customer. When you click on the customer in the grid, the panel shows the info from the customer and from the LATEST order. If the customer has five orders, you see the info from order number 5. If you edit the panel, you actually want to create a new order (order number 6) and/or update the customer info. I don't think you can do that by binding. Let's say though, that I had an easier applicatoin. Can I specifically bind a given control (e.g., a text box) to a specific field in the dataset? -Bob > -----Original Message----- > From: dotnet discussion [mailto:[EMAIL PROTECTED]]On Behalf Of > Peter Stephens > Sent: Monday, April 15, 2002 9:10 PM > To: [EMAIL PROTECTED] > Subject: Re: [DOTNET] updating dataset and dataform > > > Why don't you just bind the controls on the panel to the dataset? > You should > be able to use the same currency manager so that when the current > record is > changed in the grid, the panel's controls will automatically refresh. When > the user makes changes via the controls, the data will > automatically be sent > to the DataSet. Finally when you want to save the data to the > database, just > use a DataAdapter.Update(). The dataset maintains enough > information to know > what has changed and so will only send changed records to the database. > > From your descriptions, it seems that you are not binding any of your > controls to the dataset, but are instead manually moving data around your > user interface... Control binding does work and it provides a reasonable > amount of automation. > > -- > Peter > > > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.