ig.excel.DataValidationRuleCollection

A collection of DataValidationRule instances in a worksheet.

Dependencies

jquery-1.4.4.js
infragistics.util.js
infragistics.ext_core.js
infragistics.ext_collections.js
infragistics.ext_collectionsExtended.js
infragistics.ext_io.js
infragistics.ext_text.js
infragistics.documents.core_core.js
infragistics.ext_ui.js
The current widget has no options.
The current widget has no events.
  • add

    .add( rule:ig.excel.AnyValueDataValidationRule, cell:ig.excel.WorksheetCell );

    Applies an AnyValueDataValidationRule to a WorksheetCell.

    • rule
    • Type:ig.excel.AnyValueDataValidationRule
    • The data validation rule to apply to the cell.
    • cell
    • Type:ig.excel.WorksheetCell
    • The cell to which the data validation rule should be applied.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when rule is null.
    ig.ArgumentNullException Occurs when cell is null.
    ig.ArgumentException Occurs when the cell is from a worksheet other than this collection.
    ig.ArgumentException Occurs when the rule already applied to another worksheet.
    ig.ArgumentException Occurs when the rule is invalid based on its rule type's requirements.
    ig.ArgumentException Occurs when the cell already has a data validation rule applied to it.
    ig.ArgumentException Occurs when the cell is a total cell of a table.
  • add

    .add( rule:ig.excel.AnyValueDataValidationRule, region:ig.excel.WorksheetRegion );

    Applies an AnyValueDataValidationRule to the cells in a WorksheetRegion.

    • rule
    • Type:ig.excel.AnyValueDataValidationRule
    • The data validation rule to apply to the region.
    • region
    • Type:ig.excel.WorksheetRegion
    • The region to which the data validation rule should be applied.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when rule is null.
    ig.ArgumentNullException Occurs when region is null.
    ig.ArgumentException Occurs when the region is from a worksheet other than this collection.
    ig.ArgumentException Occurs when the rule already applied to another worksheet.
    ig.ArgumentException Occurs when the rule is invalid based on its rule type's requirements.
    ig.ArgumentException Occurs when the one or more of the cells in the region already have a data validation rule applied to it.
    ig.ArgumentException Occurs when the one or more of the cells in the region is a total cell of a table.
  • add

    .add( rule:ig.excel.TwoConstraintDataValidationRule, cell:ig.excel.WorksheetCell );

    Applies an TwoConstraintDataValidationRule to a WorksheetCell.

    • rule
    • Type:ig.excel.TwoConstraintDataValidationRule
    • The data validation rule to apply to the cell.
    • cell
    • Type:ig.excel.WorksheetCell
    • The cell to which the data validation rule should be applied.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when rule is null.
    ig.ArgumentNullException Occurs when cell is null.
    ig.ArgumentException Occurs when the cell is from a worksheet other than this collection.
    ig.ArgumentException Occurs when the rule already applied to another worksheet.
    ig.ArgumentException Occurs when the rule is invalid based on its rule type's requirements.
    ig.ArgumentException Occurs when the cell already has a data validation rule applied to it.
    ig.ArgumentException Occurs when the cell is a total cell of a table.
  • add

    .add( rule:ig.excel.TwoConstraintDataValidationRule, region:ig.excel.WorksheetRegion );

    Applies an TwoConstraintDataValidationRule to the cells in a WorksheetRegion.

    • rule
    • Type:ig.excel.TwoConstraintDataValidationRule
    • The data validation rule to apply to the region.
    • region
    • Type:ig.excel.WorksheetRegion
    • The region to which the data validation rule should be applied.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when rule is null.
    ig.ArgumentNullException Occurs when region is null.
    ig.ArgumentException Occurs when the region is from a worksheet other than this collection.
    ig.ArgumentException Occurs when the rule already applied to another worksheet.
    ig.ArgumentException Occurs when the rule is invalid based on its rule type's requirements.
    ig.ArgumentException Occurs when the one or more of the cells in the region already have a data validation rule applied to it.
    ig.ArgumentException Occurs when the one or more of the cells in the region is a total cell of a table.
  • add

    .add( rule:ig.excel.CustomDataValidationRule, cell:ig.excel.WorksheetCell );

    Applies an CustomDataValidationRule to a WorksheetCell.

    • rule
    • Type:ig.excel.CustomDataValidationRule
    • The data validation rule to apply to the cell.
    • cell
    • Type:ig.excel.WorksheetCell
    • The cell to which the data validation rule should be applied.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when rule is null.
    ig.ArgumentNullException Occurs when cell is null.
    ig.ArgumentException Occurs when the cell is from a worksheet other than this collection.
    ig.ArgumentException Occurs when the rule already applied to another worksheet.
    ig.ArgumentException Occurs when the rule is invalid based on its rule type's requirements.
    ig.ArgumentException Occurs when the cell already has a data validation rule applied to it.
    ig.ArgumentException Occurs when the cell is a total cell of a table.
  • add

    .add( rule:ig.excel.CustomDataValidationRule, region:ig.excel.WorksheetRegion );

    Applies an CustomDataValidationRule to the cells in a WorksheetRegion.

    • rule
    • Type:ig.excel.CustomDataValidationRule
    • The data validation rule to apply to the region.
    • region
    • Type:ig.excel.WorksheetRegion
    • The region to which the data validation rule should be applied.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when rule is null.
    ig.ArgumentNullException Occurs when region is null.
    ig.ArgumentException Occurs when the region is from a worksheet other than this collection.
    ig.ArgumentException Occurs when the rule already applied to another worksheet.
    ig.ArgumentException Occurs when the rule is invalid based on its rule type's requirements.
    ig.ArgumentException Occurs when the one or more of the cells in the region already have a data validation rule applied to it.
    ig.ArgumentException Occurs when the one or more of the cells in the region is a total cell of a table.
  • add

    .add( rule:ig.excel.DataValidationRule, references:ig.excel.WorksheetReferenceCollection );

    Applies a data validation rule to the a set of references.

    • rule
    • Type:ig.excel.DataValidationRule
    • The data validation rule to apply to the set of references.
    • references
    • Type:ig.excel.WorksheetReferenceCollection
    • The reference to which the data validation rule should be applied.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when rule is null.
    ig.ArgumentNullException Occurs when references is null.
    ig.ArgumentException Occurs when the references are from a worksheet other than this collection.
    ig.ArgumentException Occurs when the rule already applied to another worksheet.
    ig.ArgumentException Occurs when the rule is invalid based on its rule type's requirements.
    ig.ArgumentException Occurs when the one or more of the cells in the references collection are in the totals row of a table.
  • add

    .add( rule:ig.excel.DataValidationRule, references:ig.excel.WorksheetReferenceCollection, overwriteExistingRules:boolean );

    Applies a data validation rule to the a set of references.

    • rule
    • Type:ig.excel.DataValidationRule
    • The data validation rule to apply to the set of references.
    • references
    • Type:ig.excel.WorksheetReferenceCollection
    • The reference to which the data validation rule should be applied.
    • overwriteExistingRules
    • Type:boolean
    • Indicates whether cells in the references collection which already have data validation rules should have the rules overwritten.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when rule is null.
    ig.ArgumentNullException Occurs when references is null.
    ig.ArgumentException Occurs when the references are from a worksheet other than this collection.
    ig.ArgumentException Occurs when the rule already applied to another worksheet.
    ig.ArgumentException Occurs when the rule is invalid based on its rule type's requirements.
    ig.ArgumentException Occurs when overwriteExistingRules is False and the one or more of the cells in the references collection already have a data validation rule applied to it.
    ig.ArgumentException Occurs when the one or more of the cells in the references collection are in the totals row of a table.
  • add

    .add( rule:ig.excel.ListDataValidationRule, cell:ig.excel.WorksheetCell );

    Applies an ListDataValidationRule to a WorksheetCell.

    • rule
    • Type:ig.excel.ListDataValidationRule
    • The data validation rule to apply to the cell.
    • cell
    • Type:ig.excel.WorksheetCell
    • The cell to which the data validation rule should be applied.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when rule is null.
    ig.ArgumentNullException Occurs when cell is null.
    ig.ArgumentException Occurs when the cell is from a worksheet other than this collection.
    ig.ArgumentException Occurs when the rule already applied to another worksheet.
    ig.ArgumentException Occurs when the rule is invalid based on its rule type's requirements.
    ig.ArgumentException Occurs when the cell already has a data validation rule applied to it.
    ig.ArgumentException Occurs when the cell is a total cell of a table.
  • add

    .add( rule:ig.excel.ListDataValidationRule, region:ig.excel.WorksheetRegion );

    Applies an ListDataValidationRule to the cells in a WorksheetRegion.

    • rule
    • Type:ig.excel.ListDataValidationRule
    • The data validation rule to apply to the region.
    • region
    • Type:ig.excel.WorksheetRegion
    • The region to which the data validation rule should be applied.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when rule is null.
    ig.ArgumentNullException Occurs when region is null.
    ig.ArgumentException Occurs when the region is from a worksheet other than this collection.
    ig.ArgumentException Occurs when the rule already applied to another worksheet.
    ig.ArgumentException Occurs when the rule is invalid based on its rule type's requirements.
    ig.ArgumentException Occurs when the one or more of the cells in the region already have a data validation rule applied to it.
    ig.ArgumentException Occurs when the one or more of the cells in the region is a total cell of a table.
  • add

    .add( rule:ig.excel.OneConstraintDataValidationRule, cell:ig.excel.WorksheetCell );

    Applies an OneConstraintDataValidationRule to a WorksheetCell.

    • rule
    • Type:ig.excel.OneConstraintDataValidationRule
    • The data validation rule to apply to the cell.
    • cell
    • Type:ig.excel.WorksheetCell
    • The cell to which the data validation rule should be applied.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when rule is null.
    ig.ArgumentNullException Occurs when cell is null.
    ig.ArgumentException Occurs when the cell is from a worksheet other than this collection.
    ig.ArgumentException Occurs when the rule already applied to another worksheet.
    ig.ArgumentException Occurs when the rule is invalid based on its rule type's requirements.
    ig.ArgumentException Occurs when the cell already has a data validation rule applied to it.
    ig.ArgumentException Occurs when the cell is a total cell of a table.
  • add

    .add( rule:ig.excel.OneConstraintDataValidationRule, region:ig.excel.WorksheetRegion );

    Applies an OneConstraintDataValidationRule to the cells in a WorksheetRegion.

    • rule
    • Type:ig.excel.OneConstraintDataValidationRule
    • The data validation rule to apply to the region.
    • region
    • Type:ig.excel.WorksheetRegion
    • The region to which the data validation rule should be applied.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when rule is null.
    ig.ArgumentNullException Occurs when region is null.
    ig.ArgumentException Occurs when the region is from a worksheet other than this collection.
    ig.ArgumentException Occurs when the rule already applied to another worksheet.
    ig.ArgumentException Occurs when the rule is invalid based on its rule type's requirements.
    ig.ArgumentException Occurs when the one or more of the cells in the region already have a data validation rule applied to it.
    ig.ArgumentException Occurs when the one or more of the cells in the region is a total cell of a table.
  • clear

    .clear( );

    Removes all data validation rules from the DataValidationRuleCollection.worksheet.

  • contains

    .contains( rule:ig.excel.DataValidationRule );
    Return Type:
    boolean
    Return Type Description:
    True if the rule is applied to one or more cells on the Worksheet; False otherwise.

    Determines whether the specified data validation rule exists on the DataValidationRuleCollection.worksheet.

    • rule
    • Type:ig.excel.DataValidationRule
    • The rule to test.
  • contains

    .contains( cell:ig.excel.WorksheetCell );
    Return Type:
    boolean
    Return Type Description:
    True if the cell has a data validation rule applied; False otherwise.

    Determines whether the specified cell has a data validation rule applied to it.

    • cell
    • Type:ig.excel.WorksheetCell
    • The cell to test.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when cell is null.
    ig.ArgumentException Occurs when the cell is from a worksheet other than this collection.
  • contains

    .contains( references:ig.excel.WorksheetReferenceCollection );
    Return Type:
    boolean
    Return Type Description:
    True if the any cell from the references collection has a data validation rule applied; False otherwise.

    Determines whether the specified references collection has a data validation rule applied to any of it's cells.

    • references
    • Type:ig.excel.WorksheetReferenceCollection
    • The references collection to test.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when references is null.
    ig.ArgumentException Occurs when the references are from a worksheet other than this collection.
  • contains

    .contains( region:ig.excel.WorksheetRegion );
    Return Type:
    boolean
    Return Type Description:
    True if the any cell from the region has a data validation rule applied; False otherwise.

    Determines whether the specified region has a data validation rule applied to any of it's cells.

    • region
    • Type:ig.excel.WorksheetRegion
    • The region to test.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when region is null.
    ig.ArgumentException Occurs when the region is from a worksheet other than this collection.
  • count

    .count( );

    Gets the number of data validation rules applied on the DataValidationRuleCollection.worksheet.

  • findRule

    .findRule( cell:ig.excel.WorksheetCell );
    Return Type:
    ig.excel.DataValidationRule
    Return Type Description:
    A DataValidationRule-derived instance or null if the cell has no rule applied.

    Find the data validation rule applied to the specified cell.

    • cell
    • Type:ig.excel.WorksheetCell
    • The cell to test.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when cell is null.
    ig.ArgumentException Occurs when the cell is from a worksheet other than this collection.
  • getAllReferences

    .getAllReferences( rule:ig.excel.DataValidationRule );
    Return Type:
    ig.excel.WorksheetReferenceCollection
    Return Type Description:
    A collection of references in the DataValidationRuleCollection.worksheet with a rule applied to it that is equivalent to the specified rule.

    Gets a collection of all the references which have the specified or an equivalent rule applied to them.

    • rule
    • Type:ig.excel.DataValidationRule
    • The rule to test.
  • item

    .item( rule:ig.excel.DataValidationRule );
    Return Type:
    ig.excel.WorksheetReferenceCollection
    Return Type Description:
    Returns a WorksheetReferenceCollection.

    Gets the references which have the data validation rule applied to it.

    • rule
    • Type:ig.excel.DataValidationRule
    • A data validation rule.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when the rule is null.
    ig.excel.KeyNotFoundException Occurs when the property is retrieved and the rule is not applied to the DataValidationRuleCollection.worksheet.
    ig.ArgumentException Occurs when the property is set and the value is from a Worksheet other than this collection.
    ig.ArgumentException Occurs when the property is set and the rule is invalid based on its rule type's requirements.
  • item

    .item( rule:ig.excel.DataValidationRule, value:ig.excel.WorksheetReferenceCollection );
    Return Type:
    ig.excel.WorksheetReferenceCollection
    Return Type Description:
    Returns a WorksheetReferenceCollection.

    Sets the references which have the data validation rule applied to it.

    • rule
    • Type:ig.excel.DataValidationRule
    • A data validation rule.
    • value
    • Type:ig.excel.WorksheetReferenceCollection

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when the rule is null.
    ig.excel.KeyNotFoundException Occurs when the property is retrieved and the rule is not applied to the DataValidationRuleCollection.worksheet.
    ig.ArgumentException Occurs when the property is set and the value is from a Worksheet other than this collection.
    ig.ArgumentException Occurs when the property is set and the rule is invalid based on its rule type's requirements.
  • remove

    .remove( rule:ig.excel.DataValidationRule );
    Return Type:
    boolean
    Return Type Description:
    True if the rule was contained on the Worksheet before removal; False otherwise.

    Removes the specified rule from the DataValidationRuleCollection.worksheet.

    • rule
    • Type:ig.excel.DataValidationRule
    • The rule which should be removed.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when rule is null.
  • remove

    .remove( cell:ig.excel.WorksheetCell );
    Return Type:
    boolean
    Return Type Description:
    True if the data validation rule was found and removed from the cell; False if the cell had no data validation rule applied.

    Removes the data validation rule form the cell if one is applied.

    • cell
    • Type:ig.excel.WorksheetCell
    • The cell which should have its data validation rule cleared.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when cell is null.
    ig.ArgumentException Occurs when the cell is from a worksheet other than this collection.

    Remarks

    If the rule is only applied to the specified cell, it will be removed from the collection.

  • remove

    .remove( references:ig.excel.WorksheetReferenceCollection );
    Return Type:
    boolean
    Return Type Description:
    True if the data validation rule was found and removed from any cells in the collection; False if the cells had no data validation rule applied.

    Removes the data validation rule form all cells in the specified collection.

    • references
    • Type:ig.excel.WorksheetReferenceCollection
    • The collection of references which should have its data validation rules cleared.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when references is null.
    ig.ArgumentException Occurs when the references are from a worksheet other than this collection.

    Remarks

    If any rules in the collection are not applied to any cells after this operation, they will be removed from the collection.

  • remove

    .remove( region:ig.excel.WorksheetRegion );
    Return Type:
    boolean
    Return Type Description:
    True if the data validation rule was found and removed from any cells in the region; False if the region had no data validation rule applied.

    Removes the data validation rule form all cells in the specified region.

    • region
    • Type:ig.excel.WorksheetRegion
    • The region which should have its data validation rules cleared.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when region is null.
    ig.ArgumentException Occurs when the region is from a worksheet other than this collection.

    Remarks

    If any rules in the collection are not applied to any cells after this operation, they will be removed from the collection.

Copyright © 1996 - 2019 Infragistics, Inc. All rights reserved.