[SOLVED] DataGridView Row Header Events

Answered
1
0

The Events RowHeaderClick and RowHeaderDoubleClick do not seem to fire in the correctly.

If you have both events active and Double Click the row header the RowHeaderClick event fires before the RowHeaderDoubleClick Event.

I would have expected that if you double click the row header only the DoubleClickEvent fires

Thanks for your help

Ewan

  • You must to post comments
Good Answer
0
0

Hi Ewan,

the behavior in WinForms is the same.
If you don´t want to handle a click when it´s actually a double click,
check e.Clicks. If it´s >1 it´s a double click.

See: https://www.codeproject.com/Questions/441087/how-to-restrict-to-fire-datagridviewRowHeaderMouse

Best regards
Frank

  • Ewan Walker
    Thanks Frank VWG never needed that check
  • You must to post comments
0
0

Hi Frank

What I found though was despite a double click being raised the single click code was visited anyway even though code should have only been visited if e.clicks = 1

Thanks

Ewan

  • You must to post comments
0
0

This does not actually work as the two events interact with one another.

If you double click the single click event is still processed despite the click count having been set to two.

The single click code is filtered dependant  on the click count

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.