Remove a data validator from the sheet

Posted by: adisa.craig on 29 August 2019, 3:02 am EST

    • Post Options:
    • Link

    Posted 29 August 2019, 3:02 am EST

    Is there a way for me to delete a data validation? I used the reset() function but the spread JSON still shows the validator as being present. Also if I run the getDataValidator() function on the selection where the validator was I still can get its id and other parameters.

  • Posted 29 August 2019, 5:44 pm EST

    Hi Adisa,

    To clear validator from a cell range you could pass ‘null’ to setDataValidator() method. Please refer to the following code snippet:

    sheet.setDataValidator(rowIndex, colIndex, rowCount, colCount, null); // clear validator from sprecified range
    

    You may also refer to the following sample which demonstrates the same:

    https://codesandbox.io/s/spread-js-starter-9kqq3

    Regards

Need extra support?

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

Learn More

Forum Channels