Set Editor Status

Posted by: adisa.craig on 12 June 2024, 5:06 am EST

  • Posted 12 June 2024, 5:06 am EST

    is it possible to set the editor status. I would like to put the editorStatus into GC.Spread.Sheets.EditorStatus.enter mode manually.

  • Posted 12 June 2024, 6:04 pm EST

    Hi,

    Yes, you can manually enter the enter status using the startEdit method of the worksheet, and you can exit edit mode using the endEdit method. Please refer to the attached snippet for guidance.

    let sheet = spread.getActiveSheet();
    
    // enter status
    sheet.startEdit()
    // exit the edit mode
    sheet.endEdit()

    References:

    startEdit: https://developer.mescius.com/spreadjs/api/classes/GC.Spread.Sheets.Worksheet#startedit

    endEdit: https://developer.mescius.com/spreadjs/api/classes/GC.Spread.Sheets.Worksheet#endedit

    Regards,

    Priyam

  • Posted 13 June 2024, 4:52 am EST - Updated 13 June 2024, 4:57 am EST

    Hi thanks for the quick response. I thought entering Enter mode would fix the issue that we are having but it seems it does not. I am looking specifically to re-enter RangeSelectionMode programmatically. For example the user enter rangeSelectionMode by selecting a cell and typing “= + Shiftkey”. They click outside of the canvas and exit rangeSelectionMode, is there a way to programmatically reenter rangeSelectionMode without the user retyping the shortcut keys?

  • Posted 13 June 2024, 8:27 pm EST - Updated 13 June 2024, 8:33 pm EST

    Hi,

    As per my understanding, you aim to enter “rangeSelectionMode” after exiting this mode by clicking outside the canvas.

    Using startEdit() allows you to enter edit mode within an element but not directly into range selection mode. To enter range selection mode, you could use startEdit(false, “=”), but be aware that this will clear any previous range selections. Please refer to the attached GIF “Steps.gif” for visual reference.

    Gif:

    If the previous suggestion does not resolve your issue, could you please clarify your exact use case? Specifically, why are you clicking outside the canvas when selecting the range? Understanding this detail will allow us to assist you more effectively and explore alternative approaches to meet your requirements.

    Regards,

    Priyam

Need extra support?

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

Learn More

Forum Channels