GrapeCity.Xaml.SpreadSheet.Data
ComparisonOperator Enumeration
Example Example 


Specifies the conditional format operators.
Syntax
'Declaration
 
Public Enum ComparisonOperator 
   Inherits System.Enum
'Usage
 
Dim instance As ComparisonOperator
public enum ComparisonOperator : System.Enum 
Members
MemberDescription
Between Determines whether a cell value is between the two parameter values.
EqualTo Determines whether a cell value is equal to the parameter value.
GreaterThan Determines whether a cell value is greater than the parameter value.
GreaterThanOrEqualTo Determines whether a cell value is greater than or equal to the parameter value.
LessThan Determines whether a cell value is less than the parameter value.
LessThanOrEqualTo Determines whether a cell value is less than or equal to the parameter value.
NotBetween Determines whether a cell value is not between the two parameter values.
NotEqualTo Determines whether a cell value is not equal to the parameter value.
Example
This example uses the ComparisonOperator enumeration.
var style = new GrapeCity.Xaml.SpreadSheet.Data.StyleInfo();
style.Background = new SolidColorBrush(Windows.UI.Colors.Blue);
style.BorderLeft = new GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Red);
style.BorderTop = new GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Red);
style.BorderRight = new GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Red);
style.BorderBottom = new GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Red);
var style1 = new GrapeCity.Xaml.SpreadSheet.Data.StyleInfo();
style1.Background = new SolidColorBrush(Windows.UI.Colors.Green);
var style2 = new GrapeCity.Xaml.SpreadSheet.Data.StyleInfo();
style2.Background = new SolidColorBrush(Windows.UI.Colors.Yellow);

var rule = GrapeCity.Xaml.SpreadSheet.Data.CellValueRule.Create(GrapeCity.Xaml.SpreadSheet.Data.ComparisonOperator.Between, 2, 100, style);           
rule.Ranges = new GrapeCity.Xaml.SpreadSheet.Data.CellRange[] { new GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 5, 1) };
gcSpreadSheet1.Sheets[0].ConditionalFormats.AddRule(rule);

gcSpreadSheet1.Sheets[0].Cells[0, 0].Value = 1;
gcSpreadSheet1.Sheets[0].Cells[1, 0].Value = 45;
Dim style As New GrapeCity.Xaml.SpreadSheet.Data.StyleInfo()
style.Background = New SolidColorBrush(Windows.UI.Colors.Blue)
style.BorderLeft = New GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Red)
style.BorderTop = New GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Red)
style.BorderRight = New GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Red)
style.BorderBottom = New GrapeCity.Xaml.SpreadSheet.Data.BorderLine(Windows.UI.Colors.Red)
Dim style1 As New GrapeCity.Xaml.SpreadSheet.Data.StyleInfo()
style1.Background = New SolidColorBrush(Windows.UI.Colors.Green)
Dim style2 As New GrapeCity.Xaml.SpreadSheet.Data.StyleInfo()
style2.Background = New SolidColorBrush(Windows.UI.Colors.Yellow)

Dim s As New GrapeCity.Xaml.SpreadSheet.Data.StyleInfo()
Dim rule = GrapeCity.Xaml.SpreadSheet.Data.CellValueRule.Create(GrapeCity.Xaml.SpreadSheet.Data.ComparisonOperator.Between, 2, 100, style)

rule.Ranges = New GrapeCity.Xaml.SpreadSheet.Data.CellRange() {New GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 5, 1)}
GcSpreadSheet1.Sheets(0).ConditionalFormats.AddRule(rule)
GcSpreadSheet1.Sheets(0).Cells(0, 0).Value = 1
GcSpreadSheet1.Sheets(0).Cells(1, 0).Value = 45
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         GrapeCity.Xaml.SpreadSheet.Data.ComparisonOperator

Requirements

Target Platforms: Windows Server 2012, Windows RT

See Also

Reference

GrapeCity.Xaml.SpreadSheet.Data Namespace

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options