Spread Windows Forms 8.0 Product Documentation
Label Property (IconFilterItem)
Example 


Gets the displayed text of the filter (filter name or operator).
Syntax
'Declaration
 
Public ReadOnly Property Label As String
'Usage
 
Dim instance As IconFilterItem
Dim value As String
 
value = instance.Label
public string Label {get;}
Example
This example gets the Label property.
fpSpread1.Sheets[0].Cells[0, 1].Value = 3;
fpSpread1.Sheets[0].Cells[1, 1].Value = 2;
fpSpread1.Sheets[0].Cells[2, 1].Value = 10;
fpSpread1.Sheets[0].Cells[3, 1].Value = 1;
FarPoint.Win.Spread.IconSetConditionalFormattingRule c = new FarPoint.Win.Spread.IconSetConditionalFormattingRule(FarPoint.Win.Spread.ConditionalFormattingIconSetStyle.ThreeTriangles);
c.IconRuleSet.Add(new FarPoint.Win.Spread.ConditionalFormattingIconValue(10, FarPoint.Win.Spread.ConditionalFormattingValueType.Number, true, FarPoint.Win.Spread.ConditionalFormattingIcon.BlackCircle));
FarPoint.Win.Spread.ConditionalFormatting IconSetCF = new FarPoint.Win.Spread.ConditionalFormatting(new FarPoint.Win.Spread.Model.CellRange(0, 0, 2, 2), c);
fpSpread1.Sheets[0].Models.ConditionalFormatting.Add(IconSetCF);
FarPoint.Win.Spread.IconFilterItem iconfilter = new FarPoint.Win.Spread.IconFilterItem(FarPoint.Win.Spread.ConditionalFormattingIcon.BlackCircle);
FarPoint.Win.Spread.IRowFilter rowFilter = new FarPoint.Win.Spread.HideRowFilter(fpSpread1.ActiveSheet);
FarPoint.Win.Spread.FilterColumnDefinition fd = new FarPoint.Win.Spread.FilterColumnDefinition(1, FarPoint.Win.Spread.FilterListBehavior.Custom);
fd.Filters.Add(iconfilter);
rowFilter.ColumnDefinitions.Add(fd);
fpSpread1.ActiveSheet.RowFilter = rowFilter;
fpSpread1.ActiveSheet.AutoFilterColumn(1, iconfilter.DisplayName, 0);
fpSpread1.ActiveSheet.AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu;
listBox1.Items.Add(iconfilter.Label.ToString());
FpSpread1.Sheets(0).Cells(0, 1).Value = 3
FpSpread1.Sheets(0).Cells(1, 1).Value = 2
FpSpread1.Sheets(0).Cells(2, 1).Value = 10
FpSpread1.Sheets(0).Cells(3, 1).Value = 1
Dim c As New FarPoint.Win.Spread.IconSetConditionalFormattingRule(FarPoint.Win.Spread.ConditionalFormattingIconSetStyle.ThreeTriangles)
c.IconRuleSet.Add(New FarPoint.Win.Spread.ConditionalFormattingIconValue(10, FarPoint.Win.Spread.ConditionalFormattingValueType.Number, True, FarPoint.Win.Spread.ConditionalFormattingIcon.BlackCircle))
Dim IconSetCF As New FarPoint.Win.Spread.ConditionalFormatting(New FarPoint.Win.Spread.Model.CellRange(0, 0, 2, 2), c)
FpSpread1.Sheets(0).Models.ConditionalFormatting.Add(IconSetCF)
Dim iconfilter As New FarPoint.Win.Spread.IconFilterItem(FarPoint.Win.Spread.ConditionalFormattingIcon.BlackCircle)
Dim rowFilter As New FarPoint.Win.Spread.HideRowFilter(FpSpread1.ActiveSheet)
Dim fd As New FarPoint.Win.Spread.FilterColumnDefinition(1, FarPoint.Win.Spread.FilterListBehavior.Custom)
fd.Filters.Add(iconfilter)
rowFilter.ColumnDefinitions.Add(fd)
FpSpread1.ActiveSheet.RowFilter = rowFilter
FpSpread1.ActiveSheet.AutoFilterColumn(1, iconfilter.DisplayName, 0)
FpSpread1.ActiveSheet.AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu
ListBox1.Items.Add(iconfilter.Label.ToString())
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

Reference

IconFilterItem Class
IconFilterItem Members

 

 


Copyright © GrapeCity, inc. All rights reserved.