Delete Validation

Spread.Services Documentation
Delete Validation
Collapse All Expand All

Spread.Services Documentation > Developer's Guide > Apply Data Validations > Delete Validation

You can delete the applied validation rule using the Delete method of the IValidation interface.

Refer to the following example code to know how you can delete validation rule applied to a cell or a range of cells in a worksheet.

C# | Copy Code
--- | ---

    //Add validation
    worksheet.Range["A1:A3"].Validation.Add(ValidationType.Whole, ValidationAlertStyle.Stop, ValidationOperator.Between, 1, 8);
    worksheet.Range["B1:B3"].Validation.Add(ValidationType.Whole, ValidationAlertStyle.Stop, ValidationOperator.Between, 11, 18);

    //Delete validation.
    worksheet.Range["A1:A2"].Validation.Delete();

Copyright © GrapeCity, inc. All rights reserved.