This is likely a bug, but I am not sure whether I am overlooking something that forces things to behave this way in ListBoxSelectionMode.
As a work around, I thnk you can handle the grid.KeyDone event (or override OnKeyDown), and raise the event yourself making sure you pass the proper row range. Here is some code that worked for me in a little sample.
private void gridDataBoundGrid1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
if(e.KeyCode == Keys.Up && cc.RowIndex > this.gridDataBoundGrid1.Model.Rows.HeaderCount + 1)
{
GridRangeInfo currentRange = GridRangeInfo.Row(cc.RowIndex);
GridRangeInfo newRange = GridRangeInfo.Row(cc.RowIndex - 1);
GridSelectionChangingEventArgs se = new GridSelectionChangingEventArgs(newRange, GridSelectionReason.ArrowKey, GridRangeInfo.Empty);
this.gridDataBoundGrid1.Model.RaiseSelectionChanging(se);
if(!se.Cancel)
{
this.gridDataBoundGrid1.Selections.ChangeSelection(currentRange, newRange, false);
this.gridDataBoundGrid1.CurrentCell.InternalMove(GridDirectionType.Up, 1, GridSetCurrentCellOptions.None);
}
e.Handled = true;
}
else if(e.KeyCode == Keys.Down && cc.RowIndex < this.gridDataBoundGrid1.Model.RowCount)
{
GridRangeInfo currentRange = GridRangeInfo.Row(cc.RowIndex);
GridRangeInfo newRange = GridRangeInfo.Row(cc.RowIndex + 1);
GridSelectionChangingEventArgs se = new GridSelectionChangingEventArgs(newRange, GridSelectionReason.ArrowKey, GridRangeInfo.Empty);
this.gridDataBoundGrid1.Model.RaiseSelectionChanging(se);
if(!se.Cancel)
{
this.gridDataBoundGrid1.Selections.ChangeSelection(currentRange, newRange, false);
this.gridDataBoundGrid1.CurrentCell.InternalMove(GridDirectionType.Down, 1, GridSetCurrentCellOptions.None);
}
e.Handled = true;
}
}