• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class DataValidationCollection

Represents the data validation collection class used by the spreadsheet model.

Inheritance
object
DataValidationCollection
Implements
IEnumerable<DataValidation>
IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public class DataValidationCollection : IEnumerable<DataValidation>, IEnumerable

Properties

Count

Reports the number of items currently held by DataValidationCollection.

Declaration
public int Count { get; }
Property Value
Type Description
int

The count returned by the operation.

this[int]

Provides indexed access to values in DataValidationCollection.

Declaration
public DataValidation this[int index] { get; }
Parameters
Type Name Description
int index
Property Value
Type Description
DataValidation

Methods

Add(DataValidation)

Adds the supplied item to DataValidationCollection.

Declaration
public void Add(DataValidation validation)
Parameters
Type Name Description
DataValidation validation

The validation used by the operation.

Add(string, DataValidationType, DataValidationOperator, params string[])

Adds the supplied item to DataValidationCollection.

Declaration
public DataValidation Add(string range, DataValidationType type, DataValidationOperator @operator, params string[] formula)
Parameters
Type Name Description
string range

The range used by the operation.

DataValidationType type

The type used by the operation.

DataValidationOperator operator

The operator used by the operation.

string[] formula

The formula used by the operation.

Returns
Type Description
DataValidation

The add returned by the operation.

AddCustom(string, string)

Adds the supplied custom to DataValidationCollection.

Declaration
public DataValidation AddCustom(string range, string formula)
Parameters
Type Name Description
string range

The range used by the operation.

string formula

The formula used by the operation.

Returns
Type Description
DataValidation

The add custom returned by the operation.

AddDate(string, DataValidationOperator, params DateTime[])

Adds the supplied date to DataValidationCollection.

Declaration
public DataValidation AddDate(string range, DataValidationOperator @operator, params DateTime[] dates)
Parameters
Type Name Description
string range

The range used by the operation.

DataValidationOperator operator

The operator used by the operation.

DateTime[] dates

The dates used by the operation.

Returns
Type Description
DataValidation

The add date returned by the operation.

AddDecimal(string, DataValidationOperator, params double[])

Adds the supplied decimal to DataValidationCollection.

Declaration
public DataValidation AddDecimal(string range, DataValidationOperator @operator, params double[] numbers)
Parameters
Type Name Description
string range

The range used by the operation.

DataValidationOperator operator

The operator used by the operation.

double[] numbers

The numbers used by the operation.

Returns
Type Description
DataValidation

The add decimal returned by the operation.

AddList(string, string)

Adds the supplied list to DataValidationCollection.

Declaration
public DataValidation AddList(string range, string formula)
Parameters
Type Name Description
string range

The range used by the operation.

string formula

The formula used by the operation.

Returns
Type Description
DataValidation

The add list returned by the operation.

AddTextLength(string, DataValidationOperator, params int[])

Adds the supplied text length to DataValidationCollection.

Declaration
public DataValidation AddTextLength(string range, DataValidationOperator @operator, params int[] numbers)
Parameters
Type Name Description
string range

The range used by the operation.

DataValidationOperator operator

The operator used by the operation.

int[] numbers

The numbers used by the operation.

Returns
Type Description
DataValidation

The add text length returned by the operation.

AddTime(string, DataValidationOperator, params TimeSpan[])

Adds the supplied time to DataValidationCollection.

Declaration
public DataValidation AddTime(string range, DataValidationOperator @operator, params TimeSpan[] times)
Parameters
Type Name Description
string range

The range used by the operation.

DataValidationOperator operator

The operator used by the operation.

TimeSpan[] times

The times used by the operation.

Returns
Type Description
DataValidation

The add time returned by the operation.

AddWholeNumber(string, DataValidationOperator, params int[])

Adds the supplied whole number to DataValidationCollection.

Declaration
public DataValidation AddWholeNumber(string range, DataValidationOperator @operator, params int[] numbers)
Parameters
Type Name Description
string range

The range used by the operation.

DataValidationOperator operator

The operator used by the operation.

int[] numbers

The numbers used by the operation.

Returns
Type Description
DataValidation

The add whole number returned by the operation.

Get(string)

Retrieves the requested value from DataValidationCollection.

Declaration
public DataValidation Get(string label)
Parameters
Type Name Description
string label

The label used by the operation.

Returns
Type Description
DataValidation

The get returned by the operation.

GetEnumerator()

Retrieves the requested enumerator from DataValidationCollection.

Declaration
public IEnumerator<DataValidation> GetEnumerator()
Returns
Type Description
IEnumerator<DataValidation>

The get enumerator returned by the operation.

Remove(DataValidation)

Removes the specified data validation from the collection.

Declaration
public bool Remove(DataValidation item)
Parameters
Type Name Description
DataValidation item

The data validation to remove.

Returns
Type Description
bool

RemoveAt(int)

Removes the data validation at the specified index.

Declaration
public void RemoveAt(int index)
Parameters
Type Name Description
int index

The zero-based index of the data validation to remove.

Implements

IEnumerable<T>
IEnumerable
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX