Spread Silverlight Documentation
CreateFormulaListValidator Method
Example 


The formula condition.
Creates a validator based on a formula list.
Syntax
'Declaration
 
Public Shared Function CreateFormulaListValidator( _
   ByVal formula As System.String _
) As DataValidator
'Usage
 
Dim formula As System.String
Dim value As DataValidator
 
value = DataValidator.CreateFormulaListValidator(formula)
public static DataValidator CreateFormulaListValidator( 
   System.string formula
)

Parameters

formula
The formula condition.

Return Value

Returns a new validator.
Example
This example uses the CreateFormulaListValidator method.
gcSpreadSheet1.Sheets[0].Cells[0, 2].Value = 5;
gcSpreadSheet1.Sheets[0].Cells[1, 2].Value = 4;
gcSpreadSheet1.Sheets[0].Cells[2, 2].Value = 5;
gcSpreadSheet1.HighlightInvalidData = true;
var valid = GrapeCity.Windows.SpreadSheet.Data.DataValidator.CreateFormulaListValidator("$C$1:$C$3"); 
gcSpreadSheet1.Sheets[0].Cells[0, 1].DataValidator = valid;
gcSpreadSheet1.Sheets[0].Cells[0, 0].Text = "Formulas";
GcSpreadSheet1.Sheets(0).Cells(0, 2).Value = 5
GcSpreadSheet1.Sheets(0).Cells(1, 2).Value = 4
GcSpreadSheet1.Sheets(0).Cells(2, 2).Value = 5
GcSpreadSheet1.HighlightInvalidData = True
Dim valid = GrapeCity.Windows.SpreadSheet.Data.DataValidator.CreateFormulaListValidator("$C$1:$C$3")
GcSpreadSheet1.Sheets(0).Cells(0, 1).DataValidator = valid
GcSpreadSheet1.Sheets(0).Cells(0, 0).Text = "Formulas"
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

DataValidator Class
DataValidator Members

 

 


Copyright © GrapeCity, inc. All rights reserved.