次のコードは、第1セルに入力された値によって、セルの移動先を変更しています。
Imports GrapeCity.Win.MultiRow
Private Sub GcMultiRow1_NewCellPositionNeeded(ByVal sender As Object, ByVal e As NewCellPositionNeededEventArgs) Handles GcMultiRow1.NewCellPositionNeeded
' 第1セルで"a"が入力された場合、同じ行の第3セルへ移動します
If GcMultiRow1.CurrentCellPosition.CellIndex = 0 Then
If GcMultiRow1.CurrentCell.EditedFormattedValue = "a" Then
e.NewCellPosition = New CellPosition(e.RowIndex, 2)
End If
End If
End Sub
using GrapeCity.Win.MultiRow;
private void gcMultiRow1_NewCellPositionNeeded(object sender, NewCellPositionNeededEventArgs e)
{
// 第1セルで"a"が入力された場合、同じ行の第3セルへ移動します
if (gcMultiRow1.CurrentCell.CellIndex == 0)
{
if ((string)gcMultiRow1.CurrentCell.EditedFormattedValue == "a")
{
e.NewCellPosition = new CellPosition(e.RowIndex, 2);
}
}
}