Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Conditional formatting clarifications

Answered
Ravi Kumar asked on November 5, 2020

Hi,
 
We have few clarifications regarding conditional formatting.
 

  1. Is it possible to apply conditional formatting on text/string fields?
  2. Is is possible to apply styling to entire row based on conditional formatting?
  3. How to add background color to cell using conditional formatting?

 
Please provide any explanation with relevant example.
 
Regards,
Ravi

7 answers

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster November 5, 2020

Hi Ravi,
 
Thank you for writing to us.
 
Please find the answers to your questions below:
 

  1. Is it possible to apply conditional formatting on text/string fields?

    Currently, Flexmonster does not provide a way to apply conditional formatting based on string-value fields. In case this functionality is important to you, we would suggest considering the customizeCell() API call to implement your own cell customization logic.
  2. Is it possible to apply styling to an entire row based on conditional formatting?

    You can use the properties of the Conditional Format Object to precisely identify the rows/columns that you want to format. For example, the hierarchy & member properties can be used to only apply formatting to the cells of a specific member of a given hierarchy – feel free to check out the corresponding sample.

  3. How to add a background color to a cell using conditional formatting?

    The background color can be added to the cell with the help of the backgroundColor property:
    "format": {
    "backgroundColor": "#8fffad",
    }

    The sample mentioned above displays this approach in action.

Feel free to find more info & samples on conditional formatting in Flexmonster in the corresponding article.

We hope this helps.
 
Best regards,
Mykhailo

Public
Ravi Kumar November 6, 2020

Hi Mykhailo,
 
Thanks for the quick response.
3.How to add a background color to a cell using conditional formatting?
I understand we can set background color from CODING side, but there is no option available from UI side while adding new condition (only font-size & text-color present). Please find the attachment, in that while adding condition we need to set background color.
Please provide any solution if exists.
 
Regards,
Ravi

Attachments:
Screenshot (268).png

Public
Ravi Kumar November 6, 2020

Hi Mykhailo,

While adding condition, how to handle for “APPLY” event?
On clicking the APPLY button in that attachment, we need to catch that event and need to perform other operation is that possible?
Please provide any solution if exists.
Like wise we need to catch few more events is there any common way to catch these kind of events like “CANCEL”, “ADD CONDITION + ” events.
 
Regards,
Ravi

Attachments:
Screenshot (268).png

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster November 6, 2020

Hi Ravi,
 
Thank you for your response.
 
Please note that the background color selector can be accessed by clicking the colorpick button (the one with the “A” letter”). Once you click it, a menu with different color options is displayed for both text & background of the cell. Please see the attached screenshots illustrating this.
 
Answering your second question, Flexmonster currently does not provide a specific event for conditional formatting actions. As a workaround, we would suggest considering the reportchange event instead, which is triggered once the report is changed.
 
More info on all Flexmonster events can be found here: https://www.flexmonster.com/api/events/
 
We hope this helps.
 
Best regards,
Mykhailo 

Attachments:
scr1.png
scr2.png

Public
Ravi Kumar November 7, 2020

Hi Mykhailo,
 
Thank you for the quick response.

Setting background color is working, Coming to reportchange event it is been triggered once anything changed in flexmonster, but is there any possibility to check for the new changes been made with older ones.
Please provide if any solution.
 
Regards,
Ravi

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster November 10, 2020

Hi Ravi,
 
As mentioned before, Flexmonster does not provide specific events for conditional formatting.
 
Our reportchange suggestion is simply one of the possible workarounds – you are free to implement your own with the help of Flexmonster events.
 
Please let us know if there’s anything else we can help you with.
 
Best regards,
Mykhailo

Public
Ravi Kumar November 12, 2020

Hi Mykhailo,
 
Thanks for the response. I think i will find another way in which reportChange event will work.
 
Regards,
Ravi

Please login or Register to Submit Answer