How to reorder the conditional formatting rules

Posted by: adisa.craig on 29 October 2024, 4:12 pm EST

    • Post Options:
    • Link

    Posted 29 October 2024, 4:12 pm EST

    I am trying to programmatically change the order of formatting rules in the selection. simply changing the array returned by

    sheet.conditionalFormats.getRules()
    doesn’t seem to work. Is there a specific way this needs to be done?

  • Posted 30 October 2024, 12:33 pm EST

    Hi,

    If you’d like to change the order of formatting, you can refer to this demo link: Conditional Formatting Order Demo: https://developer.mescius.com/spreadjs/demos/features/cells/conditional-format/conditional-rules/purejs.

    To adjust the priority of conditional formatting, you can use the priority property to set the desired precedence. For more details, see this link on changing conditional format priority: Conditional Format Priority API: https://developer.mescius.com/spreadjs/api/classes/GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase#priority.

    If none of the above options meet your requirements, could you please explain your specific use case with examples? This will help us understand your needs better and provide more better assistance.

    Regards,

    Priyam

Need extra support?

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

Learn More

Forum Channels