Spread Silverlight Documentation
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.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
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

ConditionalFormat Class
ConditionalFormat Members

 

 


Copyright © GrapeCity, inc. All rights reserved.