In windows form application our data grid view has lots of event like row mouse double click or row click and extra …
But in WPF i cant find these event .
How can i add row mouse double click to my user control that has a data grid in it
i did it with some bad way that i used data grid mouse double click event and some bug happened in this way but i want know simple and standard way
i also add double click event to data grid items in row_load event but it seems make my program slow if data grid has big source
private void dataGrid1_LoadingRow(object sender, DataGridRowEventArgs e)
{
e.Row.MouseDoubleClick += new MouseButtonEventHandler(Row_MouseDoubleClick);
}
You can handle the double-click on the DataGrid element, then look at the event source to find the row and column that was clicked:
I describe this in detail in this blog post that I wrote.