[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IValidation

Interface IValidation

Namespace
GrapeCity.Documents.Excel
Assembly
GcDocs.Excel.dll

Represents data validation for a worksheet range.

public interface IValidation

Properties

AlertStyle

Gets or sets the validation alert style.

ValidationAlertStyle AlertStyle { get; set; }

Property Value

ValidationAlertStyle

ErrorMessage

Gets or sets the data validation error message (read or write).

string ErrorMessage { get; set; }

Property Value

string

ErrorTitle

Gets or sets the title of the data-validation error dialog box (read or write).

string ErrorTitle { get; set; }

Property Value

string

Formula1

Gets or sets the value or expression associated with the conditional format or data validation. Can be a constant value, a string value, a cell reference, or a formula (read-only string).

object Formula1 { get; set; }

Property Value

object

Formula2

Gets or sets the value or expression associated with the second part of a conditional format or data validation (read-only string).

object Formula2 { get; set; }

Property Value

object

IgnoreBlank

Gets or sets whether blank values are permitted by the data range validation (read or write).

bool IgnoreBlank { get; set; }

Property Value

bool

IMEMode

Gets or sets the description of the Japanese input rules.

IMEModeType IMEMode { get; set; }

Property Value

IMEModeType

InCellDropdown

Gets or sets whether data validation displays a drop-down list that contains acceptable values.

bool InCellDropdown { get; set; }

Property Value

bool

InputMessage

Gets or sets the data validation input message (read or write string).

string InputMessage { get; set; }

Property Value

string

InputTitle

Gets or sets the title of the data-validation input dialog box (read or write string).

string InputTitle { get; set; }

Property Value

string

Operator

Gets or sets the operator for the conditional format or data validation (read-only).

ValidationOperator Operator { get; set; }

Property Value

ValidationOperator

ShowError

Gets or sets whether the data validation error message will be displayed whenever the user enters invalid data (read or write).

bool ShowError { get; set; }

Property Value

bool

ShowInputMessage

Gets or sets whether the data validation input message is displayed whenever the user selects a cell in the data validation range (read or write).

bool ShowInputMessage { get; set; }

Property Value

bool

Type

Gets or sets the data type validation for a range (read-only).

ValidationType Type { get; set; }

Property Value

ValidationType

Value

Gets whether all the validation criteria are met (that is, if the range contains valid data). This property is read-only.

bool Value { get; }

Property Value

bool

Methods

Add(ValidationType, ValidationAlertStyle, ValidationOperator, object, object)

Adds data validation to the specified range.

void Add(ValidationType type, ValidationAlertStyle alertStyle = ValidationAlertStyle.Stop, ValidationOperator validationOperator = ValidationOperator.Between, object formula1 = null, object formula2 = null)

Parameters

type ValidationType

Required ValidationType. The validation type.

alertStyle ValidationAlertStyle

Optional Object. The validation alert style.

validationOperator ValidationOperator

Optional Object. The data validation operator.

formula1 object

Optional Object. The first part of the data validation equation.

formula2 object

Optional Object. The second part of the data validation when Operator is Between or NotBetween (otherwise, this argument is ignored).

Delete()

Deletes the object.

void Delete()

FromJson(string)

Generates the data validation from the JSON string.

void FromJson(string json)

Parameters

json string

the JSON string

ToJson()

Generates a JSON string from the data validation.

string ToJson()

Returns

string

The JSON string representing the data validation.