regarding DataGridViewButtonColumn!

J

Jeff

Hey

..NET 2.0

I have a DataGridView containing 4 columns, one of these columns are a
DataGridViewButtonColumn. Is it possible to during runtime to change the
display text on a specific DataGridViewButtonColumn in the DataGridView (the
button clicked) . I mean when a button is clicked and the CellContentClick
event is triggered...??

If possible then how can it be implemented? an link would be great

Best Regards

Jeff
 
N

Nicholas Paldino [.NET/C# MVP]

Jeff,

I would attach to the DataGridView's EditingControlShowing event. In
this event handler (DataGridViewEditingControlShowingEventHandler), you
would check the Control property on the
DataGridViewEditingControlShowingEventArgs instance. If it is one of your
button controls, then you can cast the return value from the Control
property to a Button and then set the properties on the control that you
wish change.
 

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

Top