I have a mulplt band grid wher I'm trying to use the up/down arrow keys to go to the same column in the next row which may be a different band. I saw another post here and I am using _BeforePerformAction event. My grid rows look simlar to
Band0_Row1
Band1_Row1
Band1_Row2
Band2_Row1
Band0_Row2
Band1_Row3
Band2_ Row2
I can arrow down to Band2_Row1 using Action.NextRow, but then it stops and won't go to Band0_Row2. What do I need to do? Thanks.
Ron
Hi Ron,
Can you post the code you are using?
Here you go. The up arrow navigation seems to work just fine. One other thing: I can't get the active cell appearance to clear from the old row cell nor does it appear in the new row. The row is surrounded by a border when I just want the same cell different row to be activated.
private void ugGrid_BeforePerformAction(object sender, BeforeUltraGridPerformActionEventArgs e)
{
if (e.UltraGridAction == UltraGridAction.AboveCell || e.UltraGridAction == UltraGridAction.BelowCell)
UltraGridCell cell = this.ugGrid.ActiveCell;
int index = cell.Column.Index;
this.ugGrid.PerformAction(UltraGridAction.DeactivateCell);
e.Cancel = true;
switch (e.UltraGridAction)
case UltraGridAction.BelowCell:
if (cell.Row.HasChild())
this.ugGrid.PerformAction(UltraGridAction.NextRow);
}
else if (cell.Row.HasNextSibling(true))
this.ugGrid.PerformAction(UltraGridAction.NextRowByTab);
} this.ugGrid.ActiveCell = this.ugGrid.ActiveRow.Cells[index];
break;
case UltraGridAction.AboveCell:
if (cell.Row.HasPrevSibling(true))
this.ugGrid.PerformAction(UltraGridAction.PrevRowByTab);
else if (cell.Row.HasParent())
this.ugGrid.PerformAction(UltraGridAction.PrevRow);
this.ugGrid.ActiveCell = this.ugGrid.ActiveRow.Cells[index];