FpSpread实现筛选的功能

FpSpread实现筛选的功能,此功能和EXCEL的还是有差别,并且也不能自定义条件.

不知道,有什么控件,可以实现相关的功能啊?

样式筛选代码:

 

 

 
       Dim instyle As New FarPoint.Win.Spread.NamedStyle
       Dim outstyle As New FarPoint.Win.Spread.NamedStyle
       instyle.BackColor = Color.Yellow
       outstyle.BackColor = Color.Aquamarine 
 
       Dim fcdc As New FarPoint.Win.Spread.FilterColumnDefinitionCollection
       Dim fcd As New FarPoint.Win.Spread.FilterColumnDefinition(1, _
                               FarPoint.Win.Spread.FilterListBehavior.SortByMostOccurrences Or _
                               FarPoint.Win.Spread.FilterListBehavior.Default)
       Dim fcd1 As New FarPoint.Win.Spread.FilterColumnDefinition(2, _
                               FarPoint.Win.Spread.FilterListBehavior.Default)
       Dim fcd2 As New FarPoint.Win.Spread.FilterColumnDefinition(3)
       fcdc.Add(fcd)
       fcdc.Add(fcd1)
       fcdc.Add(fcd2) 
 
       Dim sf As New FarPoint.Win.Spread.StyleRowFilter(FpSpread1.ActiveSheet, instyle, outstyle)
       Dim x As FarPoint.Win.Spread.FilterColumnDefinition
       For Each x In fcdc
           sf.AddColumn(x)
       Next
       FpSpread1.ActiveSheet.RowFilter = sf
 
 满足条件的,背景色,按指定的颜色显示.
 下面来,看看,隐藏式的筛选,类似于excel的筛选功能,不过没有自定义条件功能.
        Dim sf As New FarPoint.Win.Spread.HideRowFilter(Me.FpSpread1.ActiveSheet)
        sf.AddColumn(0)
        sf.AddColumn(1)
        sf.AddColumn(2)
        Me.FpSpread1.ActiveSheet.RowFilter = sf

你可能感兴趣的:(Spread)