FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > IconFilterItem Class : IconFilterItem Constructor |
'Declaration Public Function New( _ ByVal icon As ConditionalFormattingIcon _ )
'Usage Dim icon As ConditionalFormattingIcon Dim instance As New IconFilterItem(icon)
public IconFilterItem( ConditionalFormattingIcon icon )
protected void Page_Load(object sender, System.EventArgs e) { if (this.IsPostBack) return; FpSpread1.Sheets[0].RowCount = 5; 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.Web.Spread.IconSetConditionalFormattingRule c = new FarPoint.Web.Spread.IconSetConditionalFormattingRule(FarPoint.Web.Spread.ConditionalFormattingIconSetStyle.ThreeTriangles); c.IconRuleSet.Add(new FarPoint.Web.Spread.ConditionalFormattingIconValue(10, FarPoint.Web.Spread.ConditionalFormattingValueType.Number, true, FarPoint.Web.Spread.ConditionalFormattingIcon.BlackCircle)); FarPoint.Web.Spread.ConditionalFormatting IconSetCF = new FarPoint.Web.Spread.ConditionalFormatting(new FarPoint.Web.Spread.Model.CellRange(0, 0, 2, 2), c); FpSpread1.Sheets[0].ConditionalFormatting.Add(IconSetCF); FarPoint.Web.Spread.IconFilterItem iconfilter = new FarPoint.Web.Spread.IconFilterItem(FarPoint.Web.Spread.ConditionalFormattingIcon.BlackCircle); FarPoint.Web.Spread.IRowFilter rowFilter = new FarPoint.Web.Spread.HideRowFilter(FpSpread1.ActiveSheetView); FarPoint.Web.Spread.FilterColumnDefinition fd = new FarPoint.Web.Spread.FilterColumnDefinition(1, FarPoint.Web.Spread.FilterListBehavior.Custom); fd.Filters.Add(iconfilter); rowFilter.ColumnDefinitions.Add(fd); FpSpread1.ActiveSheetView.RowFilter = rowFilter; FpSpread1.ActiveSheetView.AutoFilterColumn(1, iconfilter.DisplayName); FpSpread1.ActiveSheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.Enhanced; }
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If (IsPostBack) Then Return End If FpSpread1.Sheets(0).RowCount = 5 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.Web.Spread.IconSetConditionalFormattingRule(FarPoint.Web.Spread.ConditionalFormattingIconSetStyle.ThreeTriangles) c.IconRuleSet.Add(New FarPoint.Web.Spread.ConditionalFormattingIconValue(10, FarPoint.Web.Spread.ConditionalFormattingValueType.Number, True, FarPoint.Web.Spread.ConditionalFormattingIcon.BlackCircle)) Dim IconSetCF As New FarPoint.Web.Spread.ConditionalFormatting(New FarPoint.Web.Spread.Model.CellRange(0, 0, 2, 2), c) FpSpread1.Sheets(0).ConditionalFormatting.Add(IconSetCF) Dim iconfilter As New FarPoint.Web.Spread.IconFilterItem(FarPoint.Web.Spread.ConditionalFormattingIcon.BlackCircle) Dim rowFilter As New FarPoint.Web.Spread.HideRowFilter(FpSpread1.ActiveSheetView) Dim fd As New FarPoint.Web.Spread.FilterColumnDefinition(1, FarPoint.Web.Spread.FilterListBehavior.Custom) fd.Filters.Add(iconfilter) rowFilter.ColumnDefinitions.Add(fd) FpSpread1.ActiveSheetView.RowFilter = rowFilter FpSpread1.ActiveSheetView.AutoFilterColumn(1, iconfilter.DisplayName) FpSpread1.ActiveSheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.Enhanced End Sub
Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6