Hi Burkeharris,
Thanks for your intrest in Syncfusion Products.
The SelectionsChanging event is being hit before the mousedown event. If you want to control which is being hit first, then I think youwould have to derive the grid and over the virtuals OnSelectionChanging and OnMouseDown instead of using events.If you want to use events, then this SelectionChanging handler made it so that a right-click on selected cells does not unselect anything.
private void SelectionChanging(object sender, GridSelectionChangingEventArgs e)
{
if (e.Reason == GridSelectionReason.MouseDown & Control.MouseButtons == MouseButtons.Right)
{
int row = 0;
int col = 0;
Point pt = this.GridDataBoundGrid1.PointToClient(Control.MousePosition);
if (this.GridDataBoundGrid1.PointToRowCol(pt, row, col, -1))
{
GridRangeInfoList rangeList = null;
rangeList = this.GridDataBoundGrid1.Selections.GetSelectedRows(true, false);
if (rangeList.AnyRangeIntersects(GridRangeInfo.Cell(row, col)))
{
e.Cancel = true;
}
}
}
}
Let me know if this helps.
Regards,
Nisha.