I have a DataGrid in WPF. When I double click on a row, the database query should be executed.
This DataGrid has horizontal and vertical scroll bars, and I notice that when I quickly click the arrow button of one of the scroll bars, it sends a query to the database.
The problem is that I am using the DataGrid MouseDoubleClick event, so the scrollbars belong to the DataGrid, and when I double-click this event increases.
Is there a way to execute a double-click event only by double-clicking on the DataGrid row, and not double-clicking on part of the scroll bars?
source share