Need a special offer?Find out if your project fits.
+

conditional formatting of text not working right click

Answered
Sen asked on August 26, 2024

on right click, apply via conditional formatting, highlight only working, text is not changing.

May i know the possible solutions.

3 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster August 27, 2024

Hi Sen,

Thank you for reaching out to us.

We could not reproduce the described behavior on our side. Please check setting conditional format via right-click in the following example: https://jsfiddle.net/flexmonster/y0gkjL6v/. It seems that the text color is set correctly. If you are still facing the issue, please edit the JSFiddle so the issue can be reproduced. It would greatly help us.

Looking forward to hearing from you.

Kind regards,
Nadia

Public
Sen September 4, 2024

I am using customizeCell method and inside have below code

let colorOptions = "yellow"; let bgcolor="green";
cell.text = `<div style="width: 100%; height: 100%;">
<div style="color: ${colorOptions || 'inherit'};background: ${bgcolor || 'inherit'}">4500</div>
</div>`

when I try apply to change text color using conditional formatting from the toolbar/rightclick, its not applying whereas background color works. If i remove the cell.text config works. I need to use both.

can try this fiddle sample from example https://jsfiddle.net/flexmonster/rngq4f3j/ . try applying conditional formatting. possible way to do?

can override the text color of colorOptions and apply conditional formatting text color if exists?

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster September 5, 2024

Hello,

Thank you for providing us with the details.

We recommend using the data.conditions property of the CellDataObject in the customizeCell method. For example:

if (data.conditions && data.conditions.length > 0) return;

You are welcome to check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/ujptLyew/

Please let us know if it works for you. Looking forward to hearing from you.

Kind regards,
Nadia

Please login or Register to Submit Answer