Refocus on cell after clicking menubar dropdown

Posted by: justin.arias on 31 July 2020, 1:05 pm EST

    • Post Options:
    • Link

    Posted 31 July 2020, 1:05 pm EST

    We have implemented our own dropdown menubar with our own modernized styles. A user is able to move from cell to cell using arrow keys and type without clicking in spreadjs.

    When a user clicks on a data and click any option, the user can continue to do move and type. However for us when a user clicks on our dropdown we lose focus.

    The cell is still highlighted but they cannot move or type without re-clicking on the cell. Is there any spread function we can call to match the behavior for original dropdown.

    resumePaint and setActiveCell do not work

  • Posted 4 August 2020, 12:17 pm EST

    Hi,

    You may use the focus method for the required functionality. Please refer to the following code snippet:

    spread.focus(true);
    

    API References:

    focus: https://www.grapecity.com/spreadjs/docs/v13/online/SpreadJS~GC.Spread.Sheets.Workbook~focus.html

    Regards

  • Posted 4 August 2020, 12:22 pm EST

    This will allow users to type and traverse cells using the arrow keys without having to click on the cell? Also which cell would it focus on, the last cell clicked?

  • Posted 5 August 2020, 12:36 am EST

    This would focus the spread workbook, yes after gaining the focus you may use arrow keys for navigation with clicking on the cell explicitely.

    Also which cell would it focus on, the last cell clicked?

    It would focus the selected cell i.e the cell around which selection border is displayed.

Need extra support?

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

Learn More

Forum Channels