DataValidator Question

Posted by: Luis.Alvarez on 25 July 2018, 4:18 am EST

  • Posted 25 July 2018, 4:18 am EST


    How do I remove the DataValidator from a cell? I use the DataValidator to identify multiple values assigned to a cell and the user can delete some or all the values. When only one value remains I don't want the DataValidator display to show on that particular cell. I tried clearing the cell and setting the DataValidator instance = nothing but the cell is still showing the DataValidator and when I click on it the old values are displayed.

  • Replied 25 July 2018, 10:51 pm EST


    Soon after I posted this question I found the answer.

  • Marked as Answer

    Replied 25 July 2018, 11:07 pm EST

    Hi Luis,

    Setting the DataValidator property to null/nothing should work fine. Please use the code as follows:
    gcSpreadSheet1.Sheets[0].Cells[0, 1].DataValidator = "";

    Deepak Sharma
Need extra support?

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

Learn More

Forum Channels