GrapeCity.Xaml.SpreadSheet.Data
TextComparisonOperator Enumeration
Example Example 


GrapeCity.Xaml.SpreadSheet.Data Namespace : TextComparisonOperator Enumeration
Specifies the text comparison operator.
Syntax
'Declaration
 
Public Enum TextComparisonOperator 
   Inherits System.Enum
'Usage
 
Dim instance As TextComparisonOperator
public enum TextComparisonOperator : System.Enum 
Members
MemberDescription
BeginsWith Determines whether a cell value begins with the parameter value.
Contains Determines whether a cell value contains the parameter value.
DoesNotContain Determines whether a cell value does not contain the parameter value.
EndsWith Determines whether a cell value ends with the parameter value.
Example
This example uses the TextComparisonOperator 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.SpecificTextRule.Create(GrapeCity.Xaml.SpreadSheet.Data.TextComparisonOperator.Contains, "test", style);          
rule.Ranges = new GrapeCity.Xaml.SpreadSheet.Data.CellRange[] { new GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 10, 1) };
gcSpreadSheet1.Sheets[0].ConditionalFormats.AddRule(rule);

gcSpreadSheet1.Sheets[0].SetValue(0, 0, "testing");
gcSpreadSheet1.Sheets[0].SetValue(1, 0, "test");
gcSpreadSheet1.Sheets[0].SetValue(2, 0, "a");
gcSpreadSheet1.Sheets[0].SetValue(3, 0, "t");
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 rule = GrapeCity.Xaml.SpreadSheet.Data.SpecificTextRule.Create(GrapeCity.Xaml.SpreadSheet.Data.TextComparisonOperator.Contains, "test", style);   
rule.Ranges = New GrapeCity.Xaml.SpreadSheet.Data.CellRange() {New GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 10, 1)}
GcSpreadSheet1.Sheets(0).ConditionalFormats.AddRule(rule)

GcSpreadSheet1.Sheets(0).SetValue(0, 0, "testing")
GcSpreadSheet1.Sheets(0).SetValue(1, 0, "test")
GcSpreadSheet1.Sheets(0).SetValue(2, 0, "a")
GcSpreadSheet1.Sheets(0).SetValue(3, 0, "t")
Inheritance Hierarchy

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

See Also

Reference

GrapeCity.Xaml.SpreadSheet.Data Namespace