DataGridView GotFocus

  • Thread starter Thread starter Nathan Franklin
  • Start date Start date
N

Nathan Franklin

I have a DataGridView on my windows form and I am trying to enable buttons
on a toolbar when the DataGridView's GotFocus is called and then disable
with LostFocus(). The problem is I can only get the GotFocus to fire when I
click onto the header columns... when I click into the cells of the
DataGridView, the LostFocus for the control is fired and my buttons
disable...

What am I doing wrong?

Thanks in advance.
Nathan
 
Hi,

Try using the datagridviews mouseenter and mouseleave events
instead. When you edit a cell the cells textbox gets the focus from the
datagridview. The mouse leave event does not fire until the mouse is
outside of the grid.

Ken
 
Back
Top