c# - WinForms data binding to a custom property throws an exception -
I'm sorry if this is a duplicate, but I searched the net and I could not find any answer < I am trying to bind For the following properties: I get If I bind to Please help. Thanks for any hints and advice. property should be public: enabled (or ReadOnly for Textbox ) of control: < Code> this TbProj.DataBindings.Add (new binding ("enabled", this, "CanEdit", incorrect, DataSourceUpdateMode.OnPropertyChanged, false)); This.btnSave.DataBindings.Add (new binding ("enabled", this, "dirty", false, datasource, updated.
get public dirty {get; Set; } Get back to CanEdit Private Bool {Receive} }} . System.ArgumentException: Can not bind property or column CanEdit to DataSource. when the ShowDialog () > form. enabled or read only to dirty , then everything is fine. I tried to get {return true; } and even a setter were added: set {bool bummy = value; } , same error I have also changed the CanEdit to an automatically applied property, same as dirty (only get; set; In the declaration) No benefit ...
public boolean canedit {get {Return.CurrentRecord.CanEdit (); }}
Comments
Post a Comment