Navigation to another cell

Hi all,
in a sfspreadsheet I would like to move to a certain cell, after one cell is edited.
E.g. the user is in cell B7 and enters 200 in this cell. After he has entered the value I would like to set the new cell to A8 so that he can continue his input in cell A8.
What is the best event to trigger the switch of the cells?
Kind regards
Frank

2 Replies 1 reply marked as answer

BT Balamurugan Thirumalaikumar Syncfusion Team January 26, 2021 03:15 AM UTC

Hi Frank,

Thank you for using syncfusion products.

We could understand your scenario. We will provide a Event details and sample code on January 26,2021.

Regards
Balamurugan.thirumalaikumar.


BT Balamurugan Thirumalaikumar Syncfusion Team January 26, 2021 06:10 PM UTC

Hi Frank, 
 
Thank you for your patience. 
 
We have checked your query “Navigation to another cell”. we suggest you to use PreviewKeyDown event. By using this event you can move the current cell when editing is done. 
 
Code snippet 
//Event subscription 
this.Sheet.ActiveGrid.PreviewKeyDown += ActiveGrid_PreviewKeyDown; 
 
//Event customization
private
void ActiveGrid_PreviewKeyDown(object sender, KeyRoutedEventArgs e) 
        { 
            if (e.Key == Windows.System.VirtualKey.Enter) 
            { 
                //Move to A8 cell 
                this.Sheet.ActiveGrid.CurrentCell.MoveCurrentCell(7, 1); 
            } 
        } 
 
We have attached the simple sample for your reference and you can download the same from the following link 
Please let us know if you would require further assistance.  
Regards, 
Balamurugan Thirumalaikumar  
 


Marked as answer
Loader.
Up arrow icon