Spread Silverlight Documentation
ClearRule Method
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > ConditionalFormat Class : ClearRule Method
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.Windows.SpreadSheet.Data.ScaleValueType.Number, 1, Colors.Yellow, GrapeCity.Windows.SpreadSheet.Data.ScaleValueType.Number, 50, Colors.Blue, GrapeCity.Windows.SpreadSheet.Data.ScaleValueType.Number, 100, Colors.Red, new GrapeCity.Windows.SpreadSheet.Data.CellRange[] { new GrapeCity.Windows.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.Windows.SpreadSheet.Data.ScaleValueType.Number, 1, Colors.Yellow, GrapeCity.Windows.SpreadSheet.Data.ScaleValueType.Number, 50, Colors.Blue, GrapeCity.Windows.SpreadSheet.Data.ScaleValueType.Number, 100, Colors.Red, New GrapeCity.Windows.SpreadSheet.Data.CellRange() { New GrapeCity.Windows.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
See Also

Reference

ConditionalFormat Class
ConditionalFormat Members