It should have similar behavior to the one in RadGridView https://docs.telerik.com/devtools/wpf/controls/radgridview/columns/column-groups
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>();
}
Currently, to modify the default appearance of the cells you can use the CellDecorationsNeeded event of RadVirtualGrid. The event args exposes a predefined set of properties that can be applied onto the cell. However, there is no text alignment.
Introduce a cell text alignment property in the event args similar to the CellTextAlignment of the RadVirtualGrid itself.
Thanks,