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

rule
The data validation rule to apply to the region.
region
The region to which the data validation rule should be applied.
Applies an Infragistics.Documents.Excel.ListDataValidationRule to the cells in a WorksheetRegion.

Syntax

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

Parameters

rule
The data validation rule to apply to the region.
region
The region 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 one or more of the cells in the already have a data validation rule applied to it.

See Also