ig.excel.CustomDataValidationRule

Represents a data validation rule which allows any formula to be used to validate the value applied to a cell.

Dependencies

jquery-1.4.4.js
infragistics.util.js
The current widget has no options.
The current widget has no events.
  • ig.excel.CustomDataValidationRule
    Constructor

    new $.ig.excel.CustomDataValidationRule( );

    Creates a new CustomDataValidationRule instance.

  • getFormula

    .getFormula( address:string );
    Return Type:
    string
    Return Type Description:
    A formula used to validate the value applied to a cell.

    Gets the formula used to validate the value applied to a cell.

    • address
    • Type:string
    • The address of the cell or region that serves as the basis for relative references, or null to use the top-left cell of the worksheet.

    Exceptions

    Exception Description
    ig.ArgumentException Occurs when address is not a valid cell or regions address.

    Remarks

    The formula will indicate the value is invalid by evaluating to False, 0, any ErrorValue (such as #VALUE!), or any string other than "True" (case-insensitive). True, "True" (case-insensitive), null, and non-zero numeric values will indicate a valid value has been applied.

    The address passed in is only needed if relative addresses are used in the the formula. For example, consider the formula applied is =B1, and the data validation rule is applied to the region A1:A5. If you get the formula for A1, the formula =B1 will be returned. If you get the formula for A2, =B2 will be returned. Similarly, for cell A5, =B5 will be returned. However, if the formula contains no references or all absolute references, the address is ignored. So in the previous example, if the original formula was =$B$1, the same formula will be returned regardless of the specified address.

    address can be any valid cell or region reference on a worksheet. If a region address is specified, the top-left cell or the region is used. The cell or region specified does not need to have the data validation rule applied to it. Any reference is allowed.

    The cell reference mode with which to parse address will be assumed to be A1, unless the data validation rule is applied to a worksheet which is in a workbook, in which case the Workbook.cellReferenceMode will be used.

  • getFormula

    .getFormula( address:string, format:ig.excel.WorkbookFormat, cellReferenceMode:ig.excel.CellReferenceMode, culture:string );
    Return Type:
    string
    Return Type Description:
    A formula used to validate the value applied to a cell.

    Gets the formula used to validate the value applied to a cell.

    • address
    • Type:string
    • The address of the cell or region that serves as the basis for relative references, or null to use the top-left cell of the worksheet.
    • format
    • Type:ig.excel.WorkbookFormat
    • The workbook format with which to parse address.
    • cellReferenceMode
    • Type:ig.excel.CellReferenceMode
    • The cell reference mode with which to parse address.
    • culture
    • Type:string
    • The culture to use when generating the formula string.

    Exceptions

    Exception Description
    ig.ArgumentException Occurs when address is not a valid cell or regions address.
    ig.excel.InvalidEnumArgumentException Occurs when format is not defined in the WorkbookFormat enumeration.
    ig.excel.InvalidEnumArgumentException Occurs when cellReferenceMode is not defined in the CellReferenceMode enumeration.

    Remarks

    The formula will indicate the value is invalid by evaluating to False, 0, any ErrorValue (such as #VALUE!), or any string other than "True" (case-insensitive). True, "True" (case-insensitive), null, and non-zero numeric values will indicate a valid value has been applied.

    The address passed in is only needed if relative addresses are used in the the formula. For example, consider the formula applied is =B1, and the data validation rule is applied to the region A1:A5. If you get the formula for A1, the formula =B1 will be returned. If you get the formula for A2, =B2 will be returned. Similarly, for cell A5, =B5 will be returned. However, if the formula contains no references or all absolute references, the address is ignored. So in the previous example, if the original formula was =$B$1, the same formula will be returned regardless of the specified address.

    address can be any valid cell or region reference on a worksheet. If a region address is specified, the top-left cell or the region is used. The cell or region specified does not need to have the data validation rule applied to it. Any reference is allowed.

  • isEquivalentTo

    .isEquivalentTo( other:ig.excel.DataValidationRule );
    Return Type:
    boolean
    Return Type Description:
    Returns true if the specified other has the same settings as this rule.

    Indicates if this rule is structurally equivalent to another.

    • other
    • Type:ig.excel.DataValidationRule
    • The rule to compare against
  • setFormula

    .setFormula( formula:string, address:string );

    Sets the formula used to validate the value applied to a cell.

    • formula
    • Type:string
    • The validation formula to use for the rule.
    • address
    • Type:string
    • The address of the cell or region that serves as the basis for relative references, or null to use the top-left cell of the worksheet.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when formula is null and the rule is currently applied to a Worksheet.
    ig.excel.FormulaParseException Occurs when formula is not a valid formula.
    ig.ArgumentException Occurs when address is not a valid cell or regions address.

    Remarks

    The formula will indicate the value is invalid by evaluating to False, 0, any ErrorValue (such as #VALUE!), or any string other than "True" (case-insensitive). True, "True" (case-insensitive), null, and non-zero numeric values will indicate a valid value has been applied.

    The address passed in is only needed if relative addresses are used in the the formula. When the data validation rule is applied to cells or regions, the references in the formula used by each individual cell will be shifted by the offset of the cell to the passed in address. For example, consider the formula specified is =B1 and the specified address is A1. If the data validation rule is then applied to the A5 cell, the formula is will use is =B5. However, if the references in the formula are absolute, such as =$B$1, the same formula will be applied regardless of the specified address.

    address can be any valid cell or region reference on a worksheet. If a region address is specified, the top-left cell or the region is used. The cell or region specified does not need to have the data validation rule applied to it. Any reference is allowed.

    The cell reference mode with which to parse address will be assumed to be A1, unless the data validation rule is applied to a worksheet which is in a workbook, in which case the Workbook.cellReferenceMode will be used.

  • setFormula

    .setFormula( formula:string, address:string, format:ig.excel.WorkbookFormat, cellReferenceMode:ig.excel.CellReferenceMode, culture:string );

    Sets the formula used to validate the value applied to a cell.

    • formula
    • Type:string
    • The validation formula to use for the rule.
    • address
    • Type:string
    • The address of the cell or region that serves as the basis for relative references, or null to use the top-left cell of the worksheet.
    • format
    • Type:ig.excel.WorkbookFormat
    • The workbook format with which to parse address.
    • cellReferenceMode
    • Type:ig.excel.CellReferenceMode
    • The cell reference mode with which to parse address.
    • culture
    • Type:string
    • The culture to use when parsing the formula string.

    Exceptions

    Exception Description
    ig.ArgumentNullException Occurs when formula is null and the rule is currently applied to a Worksheet.
    ig.excel.FormulaParseException Occurs when formula is not a valid formula.
    ig.ArgumentException Occurs when address is not a valid cell or regions address.
    ig.excel.InvalidEnumArgumentException Occurs when format is not defined in the WorkbookFormat enumeration.
    ig.excel.InvalidEnumArgumentException Occurs when cellReferenceMode is not defined in the CellReferenceMode enumeration.

    Remarks

    The formula will indicate the value is invalid by evaluating to False, 0, any ErrorValue (such as #VALUE!), or any string other than "True" (case-insensitive). True, "True" (case-insensitive), null, and non-zero numeric values will indicate a valid value has been applied.

    The address passed in is only needed if relative addresses are used in the the formula. When the data validation rule is applied to cells or regions, the references in the formula used by each individual cell will be shifted by the offset of the cell to the passed in address. For example, consider the formula specified is =B1 and the specified address is A1. If the data validation rule is then applied to the A5 cell, the formula is will use is =B5. However, if the references in the formula are absolute, such as =$B$1, the same formula will be applied regardless of the specified address.

    address can be any valid cell or region reference on a worksheet. If a region address is specified, the top-left cell or the region is used. The cell or region specified does not need to have the data validation rule applied to it. Any reference is allowed.

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