BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi Arvin,
You can prevent the right click from changing row selection in SfDataGrid by wiring the PreviewMouseDown event like below,
this.SfdataGrid.PreviewMouseDown+=SfdataGrid_PreviewMouseDown;
void SfdataGrid_PreviewMouseDown(object sender, MouseButtonEventArgs e) { if(e.ChangedButton==MouseButton.Right) { e.Handled = true; } } |
Regards,
Jai Ganesh S
this.datagrid.SelectionController = new GridSelectionControllerExt(datagrid);
public class GridSelectionControllerExt : GridSelectionController
{
public GridSelectionControllerExt(SfDataGrid dataGrid)
: base(dataGrid)
{ }
protected override void ProcessPointerPressed(PointerRoutedEventArgs args, RowColumnIndex rowColumnIndex)
{
var properties = args.GetCurrentPoint(DataGrid).Properties;
if (properties.IsRightButtonPressed)
{
args.Handled = true;
}
else
base.ProcessPointerPressed(args, rowColumnIndex);
}
} |