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
525
Row Editing, hitting enter go to cell below
posted

Hi,

I want to achieve the following:

When being in Row Editing mode, when a user hits enter, I want to select the cell on the same position in the row below. (like Excel does)

 I think I must do something in the RowExitedEvent, but I can't determine the index of the cell that leaves the edit mode when hitting enter.

 

 

 

 

 

 

  • 6475
    Verified Answer
    posted

    Hi,

    The cell that leaves the Edit mode would be the grid.ActiveCell. So, you'll need something like this:

    private void igGrid_RowExitedEditMode(object sender, EditingRowEventArgs e)

    {

    if (igGrid.ActiveCell.Row.Index < igGrid.Rows.Count - 1)

    {

    igGrid.ActiveCell = igGrid.Rows[igGrid.ActiveCell.Row.Index + 1].Cells[igGrid.ActiveCell.Column];

    }

    }

     

    Hope that helps,