Posted 27 October 2020, 4:11 am EST
This issue is related to
https://www.grapecity.com/forums/wpf-edition/datagrid-double-click-scro
It happens when I double click on the Filter row.
However that solution does not seem to work for us. I am using the
OriginalSource
to check if the parent is a DataGrid element, however sometimes it is, other times (when I click on empty text in a cell) the Parent is just a regular Windows Grid.This is the code I am using:
private static bool IsDataGridRowEvent(object originalSource)
{
var element = originalSource as FrameworkElement;
while (element != null)
{
if (element.Parent is DataGridCellPresenter)
return true;
element = element.Parent as FrameworkElement;
}
return false;
}
Any tip on how make this work? Thank you.