Get filtering result (visible rows only)

Posted by: david on 2 March 2023, 12:44 am EST

  • Posted 2 March 2023, 12:44 am EST

    Hello,

    I used

    Columns[0, 9].AllowAutoFilter = true
    to filter my grid.

    when I use
    sheet.GetSelections
    I retrieve all the selected rows (those displayed by the filter and those hidden but which are in my selection). How recovering only the lines actually visible on the screen.

    ex after filtering

    • row1 : displayed
    • row2 : displayed
    • row3 : hidden
    • row4 : hidden
    • row5 : displayed
    • row6 : displayed

      If I selected row1 to 5, I retrieve row 1 to 5 then 3 and 4 are hidden.

      thks
  • Posted 2 March 2023, 9:19 pm EST

    Hello David,

    To further investigate on this please provide us with the following details:

    1. Which technology control you are using? You have created the issue under the WinForms forum by the WinForms FlexGrid and TrueDBGrid both do not have any properties like AllowAutoFilter and methods like GetSelections.

    2. Which Grid control you are using?

    3. Version of the control you are using.

    4. If you can share some code replicating your issue then it will be very helpful to speedup the investigation.

    Regards,

    Prabhat Sharma.

  • Posted 5 March 2023, 9:21 pm EST

    Hello,

    I use Spread 8 V8.35.20151.0 in Winforms C# (FarPoint.Win.dll)

    thks

  • Posted 6 March 2023, 8:59 pm EST

    Hello David,

    Apologies for the inconvenience caused.

    We too can observe the issue with the Visible property of the Row class in Spread 8 and the latest Spread version.

    But in the latest Spread version, you can use the following code to check if the row is hidden or not.

    sheet.AsWorksheet().Rows[rowIndex].Hidden

    We would request you check the latest version once and see if it works fine with your project.

    https://www.grapecity.com/spreadnet/download

    Regards,

    Prabhat Sharma.

  • Posted 6 March 2023, 9:22 pm EST

    OK. Thank you for the information.

    Unfortunately, I can’t migrate a spread version at the moment.

Need extra support?

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

Learn More

Forum Channels