とても高機能で便利なのですが,Excelみたいに方向キーで操作したいと思うとコードを追加する必要があります。
グレープシティのSPREADほどExcelライクというわけではないけれど,伝票系の入力画面を作るときなどに重宝します。
Imports Infragistics.Win.UltraWinGrid
Private Sub grid1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles grid1.KeyDown
Dim gd As UltraGrid = grid1
Select Case e.KeyCode
Case Windows.Forms.Keys.Up
gd.PerformAction(UltraGridAction.EnterEditMode, False, False)
gd.PerformAction(UltraGridAction.AboveCell, False, False)
e.Handled = True
gd.PerformAction(UltraGridAction.EnterEditMode, False, False)
Case Windows.Forms.Keys.Down
gd.PerformAction(UltraGridAction.ExitEditMode, False, False)
gd.PerformAction(UltraGridAction.BelowCell, False, False)
e.Handled = True
gd.PerformAction(UltraGridAction.EnterEditMode, False, False)
Case Windows.Forms.Keys.Right
gd.PerformAction(UltraGridAction.ExitEditMode, False, False)
gd.PerformAction(UltraGridAction.NextCellByTab, False, False)
e.Handled = True
gd.PerformAction(UltraGridAction.EnterEditMode, False, False)
Case Windows.Forms.Keys.Left
gd.PerformAction(UltraGridAction.ExitEditMode, False, False)
gd.PerformAction(UltraGridAction.PrevCellByTab, False, False)
e.Handled = True
gd.PerformAction(UltraGridAction.EnterEditMode, False, False)
Case Windows.Forms.Keys.Enter
gd.PerformAction(UltraGridAction.ExitEditMode, False, False)
gd.PerformAction(UltraGridAction.BelowCell, False, False)
e.Handled = True
gd.PerformAction(UltraGridAction.EnterEditMode, False, False)
End Select
End Sub