Need databinding help

  • Thread starter Thread starter Michael Rodriguez
  • Start date Start date
M

Michael Rodriguez

Does anyone know how I can bind to the Enabled property of a toolstrip
button? That class doesn't seem to expose the DataBindings property...

TIA,

Mike Rodriguez
 
Michael,

ToolStrip derives from ScrollableControl which ultimately derives from
Control, so you definitely should be able to bind to the Enabled property.

Can you show some code?
 
Hi Nicholas,

Actually, I need to bind to the enabled property of a button on the
toolstrip. The ToolStripButton class descends from ToolStripItem which only
descends from Component. What I was trying to do something like this:

MyToolstripButton.DataBindings.Add("Enabled",
MyBusinessObjectCollection, "EnableSave");

This does not compile, of course, because ToolStripButton does not have a
DataBindings property.

Any ideas?

Mike


Nicholas Paldino said:
Michael,

ToolStrip derives from ScrollableControl which ultimately derives from
Control, so you definitely should be able to bind to the Enabled property.

Can you show some code?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Michael Rodriguez said:
Does anyone know how I can bind to the Enabled property of a toolstrip
button? That class doesn't seem to expose the DataBindings property...

TIA,

Mike Rodriguez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top