DataValidator Question

Posted by: Luis.Alvarez on 25 July 2018, 1:18 pm EST

  • Posted 25 July 2018, 1:18 pm EST

    Hello,

    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.

    Thanks,
    Luis
  • Replied 26 July 2018, 7:51 am EST

    Hello,

    Soon after I posted this question I found the answer.

    Luis
  • Marked as Answer

    Replied 26 July 2018, 8:07 am 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 = "";

    Thanks,
    Deepak Sharma
Need extra support?

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

Learn More

Forum Channels