I have a list of classes that represent mydatabase tables for example Address,Client.
My GUI tends to be a grid of data and an data entry form. This works fine for single table data entry however I now have a form that has client information and their address.
I was thinking of using a ViewModel combining the Address and Client class and assigning that to a bindingsource and binding my controls to that.
How would I bind the controls to the property names? Would this work...
if (txtLine1.DataBindings.Count == 0)
txtLine1.DataBindings.Add("Text", bindingSource, "Address.Line1", false, DataSourceUpdateMode.OnPropertyChanged);
Is having a ViewModel even possible for Winforms databinding?