I have an address Entity which is binded to WinForm controls(Textbox for street, city zip and dropdown for state)
When user wants to enter NEW address, i want the state combo box to show the default state, so for that i have done something like this...
AddressEntity Address =new AddressEntity ()
...
...
StateComboBox.DataBindings.Add("Value",Address,"State");
StateComboBox.Value="TX";
i also want to save it automatically if the Address is dirty ( New or existing). so i can't do Address ="TX"; because in my save statement i first check to see if the Address is dirty.
and if i do Address ="TX" then Address is always dirty even if the user may not have entered the Address.
it works fine BUT as soon as AddressEntity's property changes (when user starts entering data) the state gets lost (disappears), since the NewAddress's Sate is "". How can i still show the state without setting it to an entity even when user is entering data like street, or city or...zip, how can i make this work.
Thanks
i am using Adapter, LLBL 2.0 (Oct 23rd), .NET 2.0, SQL 2005