Class DataValidationImpl
Represents data validation for a worksheet range.
Inheritance
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
public class DataValidationImpl : IInternalDataValidation, IDataValidation, IParentApplication, IOptimizedUpdate, IReparse, ICloneParent
Constructors
DataValidationImpl(DataValidationCollection)
Initializes a new instance of DataValidationImpl class with specified parent value.
Declaration
public DataValidationImpl(DataValidationCollection parent)
Parameters
Type | Name | Description |
---|---|---|
DataValidationCollection | parent | Parent object for the DataValidation. |
DataValidationImpl(DataValidationCollection, DVRecord)
Initializes a new instance of DataValidationImpl class with specified parent and DVRecord value.
Declaration
[CLSCompliant(false)]
public DataValidationImpl(DataValidationCollection parent, DVRecord dv)
Parameters
Type | Name | Description |
---|---|---|
DataValidationCollection | parent | Parent object for the DataValidation. |
DVRecord | dv | Base DVRecord. |
Properties
AllowType
Gets or sets the data type validation for a range.
Declaration
public ExcelDataType AllowType { get; set; }
Property Value
Type | Description |
---|---|
ExcelDataType |
Application
Application object for this object.
Declaration
public IApplication Application { get; }
Property Value
Type | Description |
---|---|
IApplication |
CompareOperator
Gets or sets the comparison operation to perform.
Declaration
public ExcelDataValidationComparisonOperator CompareOperator { get; set; }
Property Value
Type | Description |
---|---|
ExcelDataValidationComparisonOperator |
DataRange
Gets or sets the Range of possible values.
Declaration
public IRange DataRange { get; set; }
Property Value
Type | Description |
---|---|
IRange |
DVRanges
Gets ranges of the data validation.
Declaration
public string[] DVRanges { get; }
Property Value
Type | Description |
---|---|
System.String[] |
DVRecord
Returns internal CFRecord(CF-Conditional Format). Read-only.
Declaration
[CLSCompliant(false)]
public DVRecord DVRecord { get; }
Property Value
Type | Description |
---|---|
DVRecord |
ErrorBoxText
Gets or sets the error message in the error dialog .
Declaration
public string ErrorBoxText { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ErrorBoxTitle
Gets or sets the title of the error dialog.
Declaration
public string ErrorBoxTitle { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ErrorStyle
Gets or sets the type of error.
Declaration
public ExcelErrorStyle ErrorStyle { get; set; }
Property Value
Type | Description |
---|---|
ExcelErrorStyle |
FirstDateTime
Gets or sets the first formula's DateTime value.
Declaration
public DateTime FirstDateTime { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
FirstFormula
Gets or sets the value or expression associated with the data validation.
Declaration
public string FirstFormula { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FirstFormulaTokens
Declaration
public Ptg[] FirstFormulaTokens { get; set; }
Property Value
Type | Description |
---|---|
Ptg[] |
IsEmptyCellAllowed
True if empty values are permitted by the range data validation. otherwise False.
Declaration
public bool IsEmptyCellAllowed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsListInFormula
True if formula contains list of values. otherwise False.
Declaration
public bool IsListInFormula { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsPromptBoxPositionFixed
True if prompt box position is fixed. otherwise False.
Declaration
public bool IsPromptBoxPositionFixed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsPromptBoxVisible
True if prompt box is visible. otherwise False.
Declaration
public bool IsPromptBoxVisible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsSuppressDropDownArrow
True if the drop down arrow is invisible. otherwise False.
Declaration
public bool IsSuppressDropDownArrow { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ListOfValues
Gets or sets Array of possible values.
Declaration
public string[] ListOfValues { get; set; }
Property Value
Type | Description |
---|---|
System.String[] |
Remarks
This property should be used when the values in the Data Validation list are entered manually.
Parent
Parent object for this object.
Declaration
public object Parent { get; }
Property Value
Type | Description |
---|---|
System.Object |
ParentCollection
Gets or sets parent data validation collection.
Declaration
public DataValidationCollection ParentCollection { get; set; }
Property Value
Type | Description |
---|---|
DataValidationCollection |
PromptBoxHPosition
Gets or sets Horizontal position of the prompt box.
Declaration
public int PromptBoxHPosition { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
PromptBoxText
Gets or sets the text in the prompt box.
Declaration
public string PromptBoxText { get; set; }
Property Value
Type | Description |
---|---|
System.String |
PromptBoxTitle
Gets or sets the title of the prompt box.
Declaration
public string PromptBoxTitle { get; set; }
Property Value
Type | Description |
---|---|
System.String |
PromptBoxVPosition
Gets or sets Vertical position of the prompt box.
Declaration
public int PromptBoxVPosition { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SecondDateTime
Gets or sets second formula's DateTime value.
Declaration
public DateTime SecondDateTime { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
SecondFormula
Gets or sets the value or expression associated with the second part of the data validation.
Declaration
public string SecondFormula { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SecondFormulaTokens
Declaration
public Ptg[] SecondFormulaTokens { get; set; }
Property Value
Type | Description |
---|---|
Ptg[] |
ShapesCount
Gets number of required shapes objects.
Declaration
public int ShapesCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ShowErrorBox
True if error dialog is shown. otherwise False. Default value is True.
Declaration
public bool ShowErrorBox { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ShowPromptBox
True if prompt box is shown. otherwise False. Default value is True.
Declaration
public bool ShowPromptBox { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Workbook
Parent workbook.
Declaration
public WorkbookImpl Workbook { get; }
Property Value
Type | Description |
---|---|
WorkbookImpl |
Worksheet
Parent worksheet.
Declaration
public WorksheetImpl Worksheet { get; }
Property Value
Type | Description |
---|---|
WorksheetImpl |
Methods
AddRange(ICombinedRange)
Adds range to the collection with specified cell range.
Declaration
[CLSCompliant(false)]
public void AddRange(ICombinedRange range)
Parameters
Type | Name | Description |
---|---|---|
ICombinedRange | range | Cell range to add. |
AddRange(DataValidationImpl)
Adds range to the collection with specified data validation.
Declaration
public void AddRange(DataValidationImpl dv)
Parameters
Type | Name | Description |
---|---|---|
DataValidationImpl | dv | Data validation to add. |
AddRange(RangeImpl)
Adds range to the collection with specified range.
Declaration
public void AddRange(RangeImpl range)
Parameters
Type | Name | Description |
---|---|---|
RangeImpl | range | Range to add. |
AddRange(TAddr)
Adds range to the collection with specified cell address.
Declaration
[CLSCompliant(false)]
public void AddRange(TAddr tAddr)
Parameters
Type | Name | Description |
---|---|---|
TAddr | tAddr | Cell range address. |
BeginUpdate()
This should be called before several updates to the object.
Declaration
public void BeginUpdate()
Remarks
Invoking this method improves the performance for large block of Data Validation.
Clone(Object)
Creates a copy of current instance.
Declaration
public object Clone(object parent)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parent | Parent object. |
Returns
Type | Description |
---|---|
System.Object | Returns just cloned object. |
ContainsCell(Int64)
Indicates whether this object contains data validation settings for cell with specified index.
Declaration
public bool ContainsCell(long lCellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | lCellIndex | Cell index to search. |
Returns
Type | Description |
---|---|
System.Boolean | True if this object contains data validation settings for cell with specified index. |
EndUpdate()
This method should be called after several updates to the object.
Declaration
public void EndUpdate()
Remarks
Invoking this method improves the performance for large block of Data Validation.
GetFirstSecondFormula(FormulaUtil, Boolean)
Returns data validation of the first or second formula's string value.
Declaration
public string GetFirstSecondFormula(FormulaUtil formulaUtil, bool bIsFirstFormula)
Parameters
Type | Name | Description |
---|---|---|
FormulaUtil | formulaUtil | Object used for formula parsing. |
System.Boolean | bIsFirstFormula | Is first formula. |
Returns
Type | Description |
---|---|
System.String | First or second formula's string value. |
GetFormulaPtg(ref String, FormulaUtil, WorksheetImpl, Int32, Int32)
Converts formula string to Ptg array.
Declaration
public static Ptg[] GetFormulaPtg(ref string value, FormulaUtil formulaUtil, WorksheetImpl sheet, int row, int column)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | Represents formula value. |
FormulaUtil | formulaUtil | Object used for formula parsing. |
WorksheetImpl | sheet | |
System.Int32 | row | |
System.Int32 | column |
Returns
Type | Description |
---|---|
Ptg[] | Returns ptg array. |
GetR1C1FirstSecondFormula(FormulaUtil, Boolean)
Returns data validation of the first or second formula's string value in R1C1 format.
Declaration
public string GetR1C1FirstSecondFormula(FormulaUtil formulaUtil, bool bIsFirstFormula)
Parameters
Type | Name | Description |
---|---|---|
FormulaUtil | formulaUtil | Object used for formula parsing. |
System.Boolean | bIsFirstFormula | Is first formula. |
Returns
Type | Description |
---|---|
System.String | First or second formula's string value. |
MarkUsedReferences(Boolean[])
Sets items with used reference indexes to true.
Declaration
public void MarkUsedReferences(bool[] usedItems)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean[] | usedItems | Array to mark used references in. |
ParseFormula(String, WorksheetImpl, FormulaUtil, Int32, Int32)
Parses the string formula.
Declaration
public static Ptg[] ParseFormula(string strFormula, WorksheetImpl sheet, FormulaUtil formulaUtil, int row, int column)
Parameters
Type | Name | Description |
---|---|---|
System.String | strFormula | Represents formula value. |
WorksheetImpl | sheet | Represents the work sheet. |
FormulaUtil | formulaUtil | Object used for formula parsing. |
System.Int32 | row | Row value. |
System.Int32 | column | Column value. |
Returns
Type | Description |
---|---|
Ptg[] | Returns ptg array. |
RegisterFunctions(Boolean)
Register and unregister the function with specified RefNPtg formula type.
Declaration
public static void RegisterFunctions(bool isRefNPtg)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isRefNPtg | indicates whether the function is RefNPtg supported. |
RemoveRange(RangeImpl)
Removes range from collection with specified range.
Declaration
public void RemoveRange(RangeImpl range)
Parameters
Type | Name | Description |
---|---|---|
RangeImpl | range | Range to remove. |
RemoveRange(Rectangle[])
Removes ranges from collection with specified array of rectangles.
Declaration
public void RemoveRange(Rectangle[] rectangles)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Rectangle[] | rectangles | Ranges to remove. |
Reparse()
Reparses the string formula.
Declaration
public void Reparse()
Serialize(OffsetArrayList)
Saves record into specified OffsetArrayList.
Declaration
[CLSCompliant(false)]
public void Serialize(OffsetArrayList records)
Parameters
Type | Name | Description |
---|---|---|
OffsetArrayList | records | OffsetArrayList that will receive all the data validation records. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | When records is null |
SetFormulaOneTwoValue(String, FormulaUtil, Boolean)
Sets first and second formula values.
Declaration
public void SetFormulaOneTwoValue(string value, FormulaUtil formulaUtil, bool isFormulaOne)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | Value to set. |
FormulaUtil | formulaUtil | Formula util. |
System.Boolean | isFormulaOne | True - first formula, false - second formula. |
SetFormulaValue(String, FormulaUtil, TAddr, Boolean)
Sets first and second formula values in Xml Parser
Declaration
public void SetFormulaValue(string value, FormulaUtil formulaUtil, TAddr taddr, bool isFormulaOne)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | Value to set. |
FormulaUtil | formulaUtil | Formula util. |
TAddr | taddr | Cell Range Address |
System.Boolean | isFormulaOne | True - first formula, false - second formula. |
UpdateNamedRangeIndexes(IDictionary<Int32, Int32>)
Updates indexes to named ranges with specified dictionary.
Declaration
public void UpdateNamedRangeIndexes(IDictionary<int, int> dicNewIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.Int32, System.Int32> | dicNewIndex | New indexes. |
UpdateNamedRangeIndexes(Int32[])
Updates indexes to named ranges with specified array of int value.
Declaration
public void UpdateNamedRangeIndexes(int[] arrNewIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | arrNewIndex | New indexes. |
UpdateReferenceIndexes(Int32[])
Updates reference indexes.
Declaration
public void UpdateReferenceIndexes(int[] arrUpdatedIndexes)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | arrUpdatedIndexes | Array with updated indexes. |