Activate spreadsheet "auto-filter" in code

2 posts, 0 answers
  1. Thys
    Thys avatar
    17 posts
    Member since:
    Mar 2014

    Posted 06 Aug Link to this post

    We are building a spreadsheet from values received from a database and would like to automatically enable the filter on that. We can execute the SetFilterRange command, but how can one select the used cell range in code before calling this command?

    Any other solution would be appreciated, but essentially we just need the spreadsheet on its own to be displayed, but with filtering enabled on all used columns.

  2. Nikolay Demirev
    Admin
    Nikolay Demirev avatar
    103 posts

    Posted 10 Aug Link to this post

    Hello Thys,

    The following code snippet will set the filter range to the entire used cell range of the Worksheet:
    this.radSpreadsheet.ActiveWorksheet.Filter.FilterRange = this.radSpreadsheet.ActiveWorksheet.UsedCellRange;

    Regards,
    Nikolay Demirev
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft banner
Back to Top