Aspose::Cells::IValidationCollection Class Referenceabstract

Represents data validation collection. More...

Inherits CollectionBase.

Public Member Functions

virtual Aspose::Cells::Systems::Int32 Add ()=0
 Adds a data validation to the collection. More...
 
virtual Aspose::Cells::Systems::Int32 Add (intrusive_ptr< Aspose::Cells::ICellArea > ca)=0
 Adds a data validation to the collection. More...
 
virtual intrusive_ptr< Aspose::Cells::IValidationGetObjectByIndex (Aspose::Cells::Systems::Int32 index)=0
 Gets the IValidation element at the specified index. More...
 
virtual void RemoveACell (Aspose::Cells::Systems::Int32 row, Aspose::Cells::Systems::Int32 column)=0
 Removes all validation setting on the cell. More...
 
virtual void RemoveArea (intrusive_ptr< Aspose::Cells::ICellArea > ca)=0
 Removes all validation setting on the range.. More...
 
virtual intrusive_ptr< Aspose::Cells::IValidationGetIValidationInCell (Aspose::Cells::Systems::Int32 row, Aspose::Cells::Systems::Int32 column)=0
 Gets the validation applied to given cell. More...
 

Detailed Description

Represents data validation collection.

[C++]
intrusive_ptr<IWorkbook> workbook = Factory::CreateIWorkbook();
intrusive_ptr<IValidationCollection> validations = workbook->GetIWorksheets()->GetObjectByIndex(0)->GetIValidations();
intrusive_ptr<ICellArea> area = ICellArea::CreateICellArea(0, 0, 1, 1);
intrusive_ptr<IValidation> validation = validations->GetObjectByIndex(validations->Add(area));
validation->SetType(ValidationType_List);
validation->SetFormula1(new String("a,b,c,d");

Member Function Documentation

◆ Add() [1/2]

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IValidationCollection::Add ( )
pure virtual

Adds a data validation to the collection.

Returns
IValidation object index.

NOTE: This member is now obsolete. Instead, please use Add(ICellArea) method of IValidationCollection. This property will be removed 12 months later since JANUARY 2015. Aspose apologizes for any inconvenience you may have experienced.

◆ Add() [2/2]

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IValidationCollection::Add ( intrusive_ptr< Aspose::Cells::ICellArea ca)
pure virtual

Adds a data validation to the collection.

Parameters
caThe area contains this validation.
Returns
IValidation object index.

◆ GetIValidationInCell()

virtual intrusive_ptr<Aspose::Cells::IValidation> Aspose::Cells::IValidationCollection::GetIValidationInCell ( Aspose::Cells::Systems::Int32  row,
Aspose::Cells::Systems::Int32  column 
)
pure virtual

Gets the validation applied to given cell.

Parameters
rowThe row index.
columnThe column index.
Returns
Returns an IValidation object or null if there is no validation for given cell

◆ GetObjectByIndex()

virtual intrusive_ptr<Aspose::Cells::IValidation> Aspose::Cells::IValidationCollection::GetObjectByIndex ( Aspose::Cells::Systems::Int32  index)
pure virtual

Gets the IValidation element at the specified index.

Parameters
indexThe zero based index of the element.
Returns
The element at the specified index.

◆ RemoveACell()

virtual void Aspose::Cells::IValidationCollection::RemoveACell ( Aspose::Cells::Systems::Int32  row,
Aspose::Cells::Systems::Int32  column 
)
pure virtual

Removes all validation setting on the cell.

Parameters
rowThe row index of the cell.
columnThe column index of the cell.

◆ RemoveArea()

virtual void Aspose::Cells::IValidationCollection::RemoveArea ( intrusive_ptr< Aspose::Cells::ICellArea ca)
pure virtual

Removes all validation setting on the range..

Parameters
caThe range which contains the validations setting.