Filter with isProtected flag

Posted by: vviktar on 8 December 2023, 6:23 am EST

    • Post Options:
    • Link

    Posted 8 December 2023, 6:23 am EST - Updated 8 December 2023, 12:35 pm EST

    If i want to show filter/sort popup with

     const rowFilter = new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(0, 0, this.selectedDepartments.length, this.visibleColumns.length));
            rowFilter.filterDialogVisibleInfo({ filterByValue: true })
            this.sheet.rowFilter(rowFilter);


    and in options I have
    this.sheet.options.isProtected = true;
    than I can see icons, but popups doesn’t displayed.

    Are there any options for them to work together?

    Angular version: 14.1.3

    grapecity/spread-sheets version: 15.2.5

  • Posted 11 December 2023, 1:51 am EST

    Hi,

    You could set the protection options “allowFilter” to true to allow the filter when the sheet is protected. Kindly refer to the following code snippet:

    sheet!.options.isProtected = true;
    sheet!.options.protectionOptions.allowFilter = true;

    You could refer to the following docs on Protection Options in a Locked Worksheet: https://developer.mescius.com/spreadjs/docs/features/worksheet/celllock#site_main_content-doc-content_title

    I have also attached a sample for your reference in the SpreadJS V15.2.5

    Regards,

    Ankit

  • Posted 11 December 2023, 1:52 am EST

Need extra support?

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

Learn More

Forum Channels