[OutSystems Data Grid] [Data Grid Reactive] [ HowTo ] - Conditional Highlight Rows Based input value
data-grid-reactive
Reactive icon
Forge component by Platform Maintenance

How to modify CSS for datagrid columns conditionally? in reactiveapplication?

Solution

Hi @Prajakta Roshankhede,

I think the component have a simpler solution for that. In each column you have the possibility to add a list of conditional format rules, this allows you to add a cellClass or a rowClass everytime the rule is true.

Let me know if this solves your use case,

Best Regards,
João Ferreira

Hello Joao,

I am not able to see any format option which you mentioned above, can you please guide me.

Just FYI I want to achieve color coding like below image:

image 

Thanks

Prajakta

Hi @Prajakta Roshankhede,

This was added to the component on version 2.6.0 (21 December 2021), 
Please check your version, and if you can update your component through forge.

Regards,
João Ferreira

Thank you so much it worked!!

Can we add some pointers around it in documentation. It will be helpful to others too.


Hello @Prajakta Roshankhede 

Could you provide more context?

  • are you using an auto-generated Grid or the column blocks that provide several customizations?
  • what have you tried so far by using our API?
  • which use case are you trying to achieve and where are you struggling?

Cheers,
GM

Hello,

I am using column block, I want to change background color depending on cell value.

For example in priority column want to display Normal value in green color and High value in red.

I am trying to change css with AddCellCssClass where we need to pass row number, as data is dynamic not sure how to achieve it

Thanks & Regards

Prajakta

Solution

Hi @Prajakta Roshankhede,

I think the component have a simpler solution for that. In each column you have the possibility to add a list of conditional format rules, this allows you to add a cellClass or a rowClass everytime the rule is true.

Let me know if this solves your use case,

Best Regards,
João Ferreira

Hello Joao,

I am not able to see any format option which you mentioned above, can you please guide me.

Just FYI I want to achieve color coding like below image:

image 

Thanks

Prajakta

Hi @Prajakta Roshankhede,

This was added to the component on version 2.6.0 (21 December 2021), 
Please check your version, and if you can update your component through forge.

Regards,
João Ferreira

Thank you so much it worked!!

Can we add some pointers around it in documentation. It will be helpful to others too.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.