K
Kai Siegele
Guest
Hallo, thanks all for your answers. In the meantime I hope I have found a solution. I have created a new class called KontrahentViewModel derived from System.Object with all of my properties I want to modify and use in my controls for example Rating1 IsValid etc. (The type of the propertiy IsValid must be character). I have added a new object bs of type System.Windows.Forms.BindingSource to my dialog. I have added a new object dsKontrahentViewModel of class KontrahentViewModel to the dialog. I have added the KontrahentViewModel-object to the binding source with following line of code bs:Add(dsKontrahentViewModel). I have connected the controls of the dialogs via BindSource to the properties of the KontrahentViewModel-object using following lines of code: tbRating
ataBindings:Add("Text", bs, "Rating1", FALSE, System.Windows.Forms.DataSourceUpdateMode:OnPropertyChanged). ... btnSave
ataBindings:Add("Enabled", bs, "IsValid"). and Than after connecting Now everything seems to work as pleased. The save button is disabled until IsValid in KontrahentViewModel-object changes from “FALSE” to “TRUE” when all the ratings are correct. Kind regards Kai Siegele
Continue reading...
Continue reading...