Filter with isProtected flag

Posted by: vviktar on 7 December 2023, 9:23 pm EST

    • Post Options:
    • Link

    Posted 7 December 2023, 9:23 pm EST - Updated 8 December 2023, 3:35 am 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 10 December 2023, 4:51 pm 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 10 December 2023, 4:52 pm EST

Need extra support?

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

Learn More

Forum Channels