Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
850
How to move around all the cells in a ultragrid using Up, Down, Left and Right Keys?
posted

Hello,

 

I have this question,

Is there any other solution to move around all the cells in a ultragrid using Up, Down, Left and Right Keys?

 

I saw and tried with this code:

private sub  UltraGrid1_KeyDown(ByVal sender As Object, _ ByVal e As System.Windows.Forms.KeyEventArgs) _ Handles UltraGrid1.KeyDown

Select Case e.KeyValue
        Case Keys.Up
            Me.UltraGrid1.PerformAction(UltraGridAction.ExitEditMode, False, False)
            Me.UltraGrid1.PerformAction(UltraGridAction.AboveCell, False, False)
            e.Handled = True
            Me.UltraGrid1.PerformAction(UltraGridAction.EnterEditMode, False, False)
        Case Keys.Down

            Me.UltraGrid1.PerformAction(UltraGridAction.ExitEditMode, False, False)
            Me.UltraGrid1.PerformAction(UltraGridAction.BelowCell, False, False)

            *

            *

            And so on

End sub

the Behavior of this code is exactly that I want,

But, Isn't there any other solution to do this instead of using the  code above?

Or this is the only way to do that?

The reason why I want another solution is that I don't want to use much code,
(performance reasons)


any suggestion I'll be  very grateful