Custom filters with enhanced row filtering

Posted by: bnelson1 on 8 September 2017, 3:11 pm EST

  • Posted 8 September 2017, 3:11 pm EST

    I am using spread 7 for win forms and I'm trying to get a custom filter to work with the enhanced row filtering. I am filtering for an image column and have two custom filters for if the row has an image or if it doesn't. I can get my filters to work correctly with the regular style filters with the following code:

    Dim rowFilter As New FarPoint.Win.Spread.HideRowFilter(PictureFormSpread.ActiveSheet)
    PictureFormSpread.ActiveSheet.RowFilter = rowFilter
    PictureFormSpread.ActiveSheet.Columns(0, 3).AllowAutoFilter = True
    Dim fd As New FarPoint.Win.Spread.FilterColumnDefinition(3, FarPoint.Win.Spread.FilterListBehavior.Custom)
    fd.Filters.Add(New HasImageFilter(PictureFormSpread.ActiveSheet))
    fd.Filters.Add(New NoImageFilter(PictureFormSpread.ActiveSheet))

    However, if after that code I add this line to use the enhanced row filtering:
    PictureFormSpread.ActiveSheet.AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu

    Then my custom filter no longer shows up on the drop down list for column 3 (I just see 'select all' and 'blanks') and the ShowInDropDown method is not getting called.
  • Replied 8 September 2017, 3:11 pm EST


    Could you please send us a working sample of the issue to look into.

    Please send across the same and we will proceed thereon.

  • Replied 8 September 2017, 3:11 pm EST


    Here is my VB 2012 solution folder to demonstrate my issue. It is currently using the older style filters and the custom filters are showing up on column 2. However, if you un-comment line 54 of Form1.vb to use the enhanced row filtering, then the custom filters no longer show up on column 2.

  • Replied 8 September 2017, 3:11 pm EST


    Any update on this?
  • Replied 8 September 2017, 3:11 pm EST


    Can I get an update on this problem?
  • Replied 8 September 2017, 3:11 pm EST


    We are able to replicate the issue and hence we are escalating the same to the concerned team for the fix.

    Tracking id for your issue is #240292

    We will update you as soon as we hear anything from our concerned team.

  • Marked as Answer

    Replied 8 September 2017, 3:11 pm EST

    Hello Bnelson1,

    This is not a bug of spread and is intended behavior. Root cause of the issue is that when AutoFilterMode=EnhancedContextMenu then EnhancedFilterContextMenu of a column when show Text of cells in that column, it doesn't show customFilter.

    And workaround for this case is that you should use FilterGadget instead of EnhancedContextMenu.

    Hope it helps.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels