I forgot to mention that this is a c# winforms 2.0 app.
>I have a group of buttons which I want to bind thier enabled properties to
>properties of a custom object (all of which will be boolean value types).
>How do I do this?
Vlado - 29 Mar 2006 08:30 GMT
>I forgot to mention that this is a c# winforms 2.0 app.
>
>>I have a group of buttons which I want to bind thier enabled properties to
>>properties of a custom object (all of which will be boolean value types).
>>How do I do this?
Try something like this:
this.button1.DataBindings.Add(new Binding("Enabled",
this.yourCustomObjectInstance, "BooleanPropertyName"));
Scott C. Reynolds - 23 May 2006 04:48 GMT
> I forgot to mention that this is a c# winforms 2.0 app.
>
>> I have a group of buttons which I want to bind thier enabled properties to
>> properties of a custom object (all of which will be boolean value types).
>> How do I do this?
You could try
buttonName.DataBindings.Add("Enabled", CustomBusinessObject,
"BooleanPropertyName");