Null selection on spreadsheet

Currently, there seems to be no way of bootstrapping a spreadsheet with no cell selected. This could be a handy feature if it could be implemented. There are a lot of scenarios where being able to tell the spreadsheet to not select anything is necessary.

Right now, using the selection API on the javascript spreadsheet, if you say setSelection(null) or setSelection() or even setSelection(undefined), you either get the A1 cell selected or an error.

Unfortunately currently it is not available to clwear the selectiuon in the dhxSpreadsheet.
I’ve sent your report to the dev team and it will be observed for the future updates.

As a workaround you may try to select the non-existing cell:

spreadsheet.selection.setSelectedCell("a9999")

so the selection will be reseted.

We have added the possibility to clear the selection in the dhx.SpreadSheet using the removeSelectedCell() method:
https://docs.dhtmlx.com/spreadsheet/api/selection_removeselectedcell_method/
The method is available since the dhx.Spreadsheet 4.2 update.
Please, try to download the latest available build to get that functionality.

1 Like

Excellent news! Looking forward to trying this already!