Home Forums WinForms controls Xceed Grid for WinForms Move to next cell after edit

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17341 |

    I would like to automatically move to the next cell when the user presses the Enter key at the completion of a cell edit (like Excel).

    Imported from legacy forums. Posted by Morgan (had 1703 views)

    Xceed Support
    Member
    Post count: 5658

    Hi Morgan,

    You can handle the DataCell’s KeyDown event, check whether an enter key was triggered then set the next cell as current using The CurrentCell property of the GridControl.

    Imported from legacy forums. Posted by Mohamed [Xceed] (had 307 views)

    User (Old forums)
    Member
    Post count: 23064

    Could you give me an example?  I am not sure how to access the DataCell’s KeyDown event.

    Imported from legacy forums. Posted by Morgan (had 375 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi,

    We are not sure what you mean by moving to ‘the next cell’. 

    Do you want the user not to move to the next (insertion) row when the user press Enter if other cells on the right are still empty, but perhaps you want to move to the next insertion row if all the cells are filled?   And if Enter is pressed when you’re at the extreme right of the row, but if some cells that are still empty of the left, you go to the empty cells first instead of adding a new insertion row?  

    This is a complex question and a “code example” could take anything from a couple of lines to more than a hundred lines, depending of several factors. 

    Regards

     

    Imported from legacy forums. Posted by Ghislain (had 425 views)

    User (Old forums)
    Member
    Post count: 23064

    When the user is finished editing a cell and presses Enter, I want the next cell to the right to be the new CurrentCell.  Something similar to the way EXCEL behaves, but instead of moving down I want to move across.

    Imported from legacy forums. Posted by Morgan (had 1388 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.