Version

Add(CustomDataValidationRule,WorksheetRegion) Method

Applies an CustomDataValidationRule to the cells in a WorksheetRegion.
Syntax
public void Add( 
   CustomDataValidationRule 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.ArgumentNullExceptionOccurs when rule is null.
System.ArgumentNullExceptionOccurs when region is null.
System.ArgumentExceptionOccurs when the region is from a worksheet other than this collection.
System.ArgumentExceptionOccurs when the rule already applied to another worksheet.
System.ArgumentExceptionOccurs when the rule is invalid based on its rule type's requirements.
System.ArgumentExceptionOccurs when the one or more of the cells in the region already have a data validation rule applied to it.
System.ArgumentExceptionOccurs when the one or more of the cells in the region is a total cell of a table.
Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also