To work this around, you can disable the default behavior that happens on right click and then implement custom one from scratch. To do so, you can use the PreviewKeyDown event of RadVirtualGrid.
private void VirtualGrid_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
var virtualGrid = (RadVirtualGrid)sender;
if (e.Key == System.Windows.Input.Key.Right)
{
var currentCell = virtualGrid.CurrentCellInfo;
var newCellIndex = Math.Min(currentCell.ColumnIndex + 1, virtualGrid.InitialColumnCount - 1);
var nextCell = new VirtualGridCellInfo(currentCell.RowIndex, newCellIndex, vg);
virtualGrid.CurrentCellInfo = nextCell;
virtualGrid.SelectedCells.Clear();
virtualGrid.SelectedCells.Add(nextCell);
var viewportWidth = this.panel.ViewportWidth - virtualGrid.RowHeaderWidth;
var newCellX = (virtualGrid.ColumnWidth * nextCell.ColumnIndex) - this.panel.HorizontalOffset;
if (newCellX >= viewportWidth)
{
var delta = virtualGrid.ColumnWidth + (newCellX - viewportWidth);
this.panel.SetHorizontalOffset(this.panel.HorizontalOffset + delta);
}
e.Handled = true;
}
}
private VirtualGridCompoundPanel panel;
private void VirtualGrid_Loaded(object sender, RoutedEventArgs e)
{
var virtualGrid = (RadVirtualGrid)sender;
this.panel = virtualGrid.FindChildByType<VirtualGridCompoundPanel>();
}