regarding DataGridViewButtonColumn!

  • Thread starter Thread starter Jeff
  • Start date Start date
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
 
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.
 
Back
Top