|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DataGridView GotFocusI 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 --------------- Show quote "Nathan Franklin" <nat***@tsn.cc> wrote in message news:dqrojv$67i$1@news-02.connect.com.au... >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 > |
|||||||||||||||||||||||