BindingSource.... Control.Enabled Property

BindingSource.... Control.Enabled Property

Old forum URL: forums.lhotka.net/forums/t/41.aspx


ward0093 posted on Tuesday, May 09, 2006

I am using the BindingSource Object and it is set to my Invoice Root Object.  In the Designer, I set a Form Button (Button1) "Enable" Property to the InvoiceBindingSource.IsInvoiceLoaded (ReadOnly) Property.

The Databinding is added correctly to the control.databindings collection but nothing happens... I mean when the Invoice Object is loaded and the property IsInvoiceLoaded changes... the Button does not become enabled....  What am I doing wrong ????

Here is my Databinding (from the Designer Code):

Me.ButtonInvoiceSave.DataBindings.Add(New System.Windows.Forms.Binding("Enabled", Me.InvoiceBindingSource, "IsInvoiceLoaded", true))

P.S. the Invoice Root Object IS NOT a collection object it inherits the BusinessBase Class (there is not a IBindingList object).

 

ward0093

ward0093 replied on Tuesday, May 09, 2006

I just read the "CSLA .NET 20" Binding Windows Form buttons to IsValid or IsSavable properties on Rockys Site... is this the only way to bind a button control?  Through the event chain?

What good is the Databindings property of a button control if it does not handle the events from the DataSource?

Is this the only to enable/disable a save button?

the article: http://www.lhotka.net/Articles.aspx?id=5faaee8e-8496-4845-86f7-787c6b64096c

 

ward0093

Copyright (c) Marimer LLC