GrapeCity.Xaml.SpreadSheet.Data
ClearRule Method
Example 


Removes all rules.
Syntax
'Declaration
 
Public Sub ClearRule() 
'Usage
 
Dim instance As ConditionalFormat
 
instance.ClearRule()
public void ClearRule()
Example
This example clears all rules.
GcSpreadSheet1.Sheets[0].Cells[0, 0].Value = -1;
GcSpreadSheet1.Sheets[0].Cells[1, 0].Value = 49;
GcSpreadSheet1.Sheets[0].Cells[2, 0].Value = 101;
GcSpreadSheet1.Sheets[0].ConditionalFormats.AddThreeScaleRule(GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number, 1, Windows.UI.Colors.Yellow, GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number, 50, Windows.UI.Colors.Blue, GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number, 100, Windows.UI.Colors.Red, new GrapeCity.Xaml.SpreadSheet.Data.CellRange[] { new GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 20, 1) }); 

private void button1_Click_1(object sender, RoutedEventArgs e)
{
    GcSpreadSheet1.Sheets[0].ConditionalFormats.ClearRule();
}
GcSpreadSheet1.Sheets(0).Cells(0, 0).Value = -1
GcSpreadSheet1.Sheets(0).Cells(1, 0).Value = 49
GcSpreadSheet1.Sheets(0).Cells(2, 0).Value = 101
GcSpreadSheet1.Sheets(0).ConditionalFormats.AddThreeScaleRule(GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number, 1, Windows.UI.Colors.Yellow, GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number, 50, Windows.UI.Colors.Blue, GrapeCity.Xaml.SpreadSheet.Data.ScaleValueType.Number, 100, Windows.UI.Colors.Red, New GrapeCity.Xaml.SpreadSheet.Data.CellRange() { New GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 20, 1) })

Private Sub button1_Click(sender As Object, e As RoutedEventArgs) Handles button1.Click
    GcSpreadSheet1.Sheets(0).ConditionalFormats.ClearRule()
End Sub
Requirements

Target Platforms: Windows Server 2012, Windows RT

See Also

Reference

ConditionalFormat Class
ConditionalFormat Members

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options