Posted 8 November 2022, 8:49 pm EST
Hello,
Is there a way to validate the conditional formatting of a specific cell from code?
E. g. invoke some method on the given cell?
Forums Home / Spread / SpreadJS
Posted by: juraj.jakubik on 8 November 2022, 8:49 pm EST
Posted 8 November 2022, 8:49 pm EST
Hello,
Is there a way to validate the conditional formatting of a specific cell from code?
E. g. invoke some method on the given cell?
Posted 9 November 2022, 10:49 pm EST
Hi,
My understanding is that you want to determine whether a specific cell includes conditional rules. You might employ the getRules method, which asks for the row and column numbers as parameters, in this use case.
You might also use the evaluate method, which, if the cell meets the requirement, returns the rule’s cell style. If your use case doesn’t fit the solution offered, kindly elaborate.
References for API:
getRules method: https://www.grapecity.com/spreadjs/api/classes/GC.Spread.Sheets.ConditionalFormatting.ConditionalFormats#getrules
evaluate method: https://www.grapecity.com/spreadjs/api/classes/GC.Spread.Sheets.ConditionalFormatting.ConditionRuleBase#evaluate
Regards,
Ankit