I have a list of classes that represent mydatabase tables, for example Address, Client.
My GUI tends to be a data grid and a form of data entry. This works fine for entering data with a single table, but now I have a form in which there is customer information and their address.
I was thinking about using a ViewModel that combines the Address and Client class, and assigning this source to bind and bind controls to it.
How to associate controls with property names? Will it work ...
if (txtLine1.DataBindings.Count == 0) txtLine1.DataBindings.Add("Text", bindingSource, "Address.Line1", false, DataSourceUpdateMode.OnPropertyChanged);
Does ViewModel even have the ability to bind Winforms data?
source share