Infragistics(R) NetAdvantage(R) WPF
Add(ListDataValidationRule,WorksheetCell) Method
See Also  E-mail your feedback on this topic.
Infragistics.Documents.Excel Namespace > DataValidationRuleCollection Class > Add Method : Add(ListDataValidationRule,WorksheetCell) Method

rule
The data validation rule to apply to the cell.
cell
The cell to which the data validation rule should be applied.
Applies an Infragistics.Documents.Excel.ListDataValidationRule to a WorksheetCell.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub Add( _
   ByVal rule As ListDataValidationRule, _
   ByVal cell As WorksheetCell _
) 
C# 
public void Add( 
   ListDataValidationRule rule,
   WorksheetCell cell
)

Parameters

rule
The data validation rule to apply to the cell.
cell
The cell to which the data validation rule should be applied.

Exceptions

ExceptionDescription
System.ArgumentNullException Occurs when is null.
System.ArgumentNullException Occurs when is null.
System.ArgumentException Occurs when the is from a worksheet other than this collection.
System.ArgumentException Occurs when the already applied to another worksheet.
System.ArgumentException Occurs when the is invalid based on its rule type's requirements.
System.InvalidOperationException Occurs when the already has a data validation rule applied to it.

See Also