Ian , Thanks for that , I was sort of hoping to do it without using the changed events - I avoid events unless they are neccesary as forms are cluttered with them and programmers new o the program often struggle. .
The not uodating until I leave the field is fine as on this control the customer only selects the country as long as the id is in the DataSet Im happy. So my choice is something that may be dodgy versus something that I read that the devs of .Net are working on multisource dataviews and this would extend to DataSets. Mmm choices. Also any reason you bound to the Dataset rather than the table ? eg > countryComboBox.DataBindings.Add("SelectedValue", > customerDataSet.Address, "countryID"); comboCountry.DataBindings.Add("SelectedValue", customerDataset1, "Address.CountryID"); Ben -----Original Message----- From: dotnet discussion [mailto:[EMAIL PROTECTED]]On Behalf Of Ian Griffiths Sent: Thursday, 9 May 2002 7:23 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET] WinForms Data Binding D'Oh! Just spotted something slightly stupid in my previous post: > bm = BindingContext[customerDataset1, "Address"]; > DataRowView drv = bm.Current as DataRowView; > CustomerDataset.AddressRow addressRow = > drv.Row as CustomerDataset.AddressRow; > > addressRow["CountryID"] = val; > } Actually you don't need to bother casting the DataRowView in this example. Having got that all you need is this: drv.Row["CountryID"] = val; But if you want typesafe access through a typed dataset, use the above code. But then don't do what I did and forget the exploit the type safety... Replace the last line with: addressRow.CountryID = val; which is not only type-safe, but should be marginally faster since it avoids doing the string lookup on the column name. -- Ian Griffiths DevelopMentor 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.