Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
There are three validation modes supported by Aspose.Cells.GridDesktop as follows:
In this validation mode, users are restricted from entering values into specified cells. Once Is Required Validation is applied on a worksheet cell, it becomes mandatory for a user to enter a value into that cell.
In this mode, restrictions are applied on worksheet cells for users to submit data into cells in a specific format. The pattern of data format is provided in the form of a Regular Expression.
To use Custom Validation, it is mandatory for developers to implement the Aspose.Cells.GridDesktop.ICustomValidation interface. The interface provides a Validate method. This method returns true if data is valid, otherwise it returns false.
To add any kind of validation to a worksheet cell, please follow the steps below:
In the above code snippet, we have added a custom validation in A8 cell, but we have not implemented that custom validation yet. As explained at the beginning of this topic, to apply custom validation we must implement the ICustomValidation interface. So, let’s try creating a class to implement the ICustomValidation interface.
In the code snippet given below, we have implemented a custom validation to perform the following checks:
Once a validation is added to a specific worksheet cell, it may be required by developers to access and modify the attributes of a specific validation at run-time. Aspose.Cells.GridDesktop has made it simple for developers to accomplish this task.
To access a specific validation, please follow the steps below:
To remove a specific validation from the worksheet, please follow the steps below:
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.