GrapeCity.Xaml.SpreadSheet.Data
DuplicateRule Constructor
Example 


GrapeCity.Xaml.SpreadSheet.Data Namespace > DuplicateRule Class : DuplicateRule Constructor
Constructs a unique rule.
Syntax
'Declaration
 
Public Function New()
'Usage
 
Dim instance As New DuplicateRule()
public DuplicateRule()
Example
This example creates a duplicate rule.
gcSpreadSheet1.Sheets[0].Cells[0, 0].Value = 1;
gcSpreadSheet1.Sheets[0].Cells[1, 0].Value = 1;
gcSpreadSheet1.Sheets[0].Cells[2, 0].Value = 6;
gcSpreadSheet1.Sheets[0].Cells[3, 0].Value = 3;       

private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            GrapeCity.Xaml.SpreadSheet.Data.StyleInfo style1 = new GrapeCity.Xaml.SpreadSheet.Data.StyleInfo();
            style1.Background = new SolidColorBrush(Windows.UI.Colors.Green);
            GrapeCity.Xaml.SpreadSheet.Data.DuplicateRule test = new GrapeCity.Xaml.SpreadSheet.Data.DuplicateRule();
            test.Style = style1;
            test.Ranges = new GrapeCity.Xaml.SpreadSheet.Data.CellRange[] { new GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 5, 1) };
            gcSpreadSheet1.Sheets[0].ConditionalFormats.AddRule(test);             
        }
GcSpreadSheet1.Sheets(0).Cells(0, 0).Value = 1
GcSpreadSheet1.Sheets(0).Cells(1, 0).Value = 1
GcSpreadSheet1.Sheets(0).Cells(2, 0).Value = 6
GcSpreadSheet1.Sheets(0).Cells(3, 0).Value = 3

Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs)
        Dim style1 As New GrapeCity.Xaml.SpreadSheet.Data.StyleInfo()
        style1.Background = New SolidColorBrush(Windows.UI.Colors.Green)
        Dim test As New GrapeCity.Xaml.SpreadSheet.Data.DuplicateRule()
        test.Style = style1
        test.Ranges = New GrapeCity.Xaml.SpreadSheet.Data.CellRange() {New GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 5, 1)}
        GcSpreadSheet1.Sheets(0).ConditionalFormats.AddRule(test)
    End Sub
See Also

Reference

DuplicateRule Class
DuplicateRule Members