How to go to Next Row in Spreadsheet in Button Click event in C# Window Application

Posted by: sanjay18 on 8 September 2017, 2:33 pm EST

  • Posted 8 September 2017, 2:33 pm EST

    Hi,


             In SpreadSheet i Want to go to  Next Row When we Click on button in C# Window Application.


             I Want to go to Next Row  When button click event and Also Focus go to Next ro win Button Click event.


    Regards,


    Sanjay Chaudhari


    Mumbai,


    India. 


     


     


     


       

  • Replied 8 September 2017, 2:33 pm EST

    Hello,

    You set the active cell to the next row on a button click  using the following code:

    FpSpread1.Sheets[0].SetActiveCell[FpSpread1.Sheets(0).ActiveRowIndex + 1, FpSpread1.Sheets(0).ActiveColumnIndex];

     

    I hope it helps.

    Thanks,

  • Replied 8 September 2017, 2:33 pm EST

    Hi,

    Another option to consider is to use the Action:

            FarPoint.Win.Spread.Action action = fpSpread1.GetActionMap().Get(FarPoint.Win.Spread.SpreadActions.MoveToNextRow);
            action.PerformAction(fpSpread1.GetRootWorkbook().GetActiveWorkbook());

    SpreadActions defines the standard built-in UI action keys, and you can get the Action object from the ActionMap returned by GetActionMap.  Action.PerformAction expects the SpreadView object to be passed in as the argument.

    UndoAction object will also work, and can support undo (you need to use FpSpread.UndoManager.PerformUndoAction in order to be able to undo it with Ctrl+Z in the Spread UI).

     

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels