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
40
Cells navigating in grid
posted

 Hello,

I have a problem with changing cell from one row to another using key down on keyboard. If I pressed key down on keyboard I want to select text in new active cell. After this I want to write sth n this cell without mouse clisk on it.

 gvPliki is type of ultrawingrid.

 Private Sub gvPliki_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles gvPliki.KeyUp
      If e.KeyValue = Keys.Down Then
         If Me.gvPliki.ActiveCell.Row.Index + 1 = Me.gvPliki.Rows.Count - 1 Then
            Me.gvPliki.ActiveCell = Me.gvPliki.Rows(Me.gvPliki.ActiveCell.Row.Index + 1).Cells(Me.gvPliki.ActiveCell.Column.Index)
         End If
      End If
   End Sub

 

Thanks for help 

  • 135
    Offline posted
    In article , pytanie1 says...
    Hi.

    I use the following to allow users to use the down arrow to navigate
    rows.

    // Allow the DownArrow to move the user down a row unless the user is in
    // a DropDown
    ultraGrid1.KeyActionMappings.Add(
    new GridKeyActionMapping(
    // the key code
    Keys.Down,
    // the action to take
    UltraGridAction.BelowCell,
    // disallowed state
    UltraGridState.IsDroppedDown,
    // required state (none)
    UltraGridState.InEdit,
    // disallowed special keys
    Infragistics.Win.SpecialKeys.Alt,
    // required special keys (none)
    0));

    HTH
  • 469350
    Verified Answer
    Offline posted

     After you set the ActiveCell, you can use the PerformAction method of the grid to EnterEditMode on the cell.