39
Views
3
Comments
Solved
Datagrid CSS styling
Application Type
Reactive

Hi all,

I am using Datagrid in my project and I have requirement to show CSS styling to a column on a speciifc condition.

I'm attaching the sample OML. I need 2 thing here

  1. There is a flag in structure called "Is-Affiliated". If it is "true" I want the whole row to be highlighted in "red", else in "grey"
  2. Based on the tag, I want the CSS to be applied for the column


Thanks,

Gowtham

Datagrid_CSS.oml
2023-03-08 10-32-19
Vinod Kumar R
Solution

Hi @Gowtham,


You need to use the grid API_Style "Add Class" for highlighting the row items.

I couldn't get your 2ns question. If its related to adding tag in grid please refer the link.

Attaching the OML for your reference.

Regards,

Vinod


Datagrid_CSSAmended.oml
2023-10-30 06-03-17
Gowtham

Hi Vinod,

Thanks for your reply. I was able to solve one issue. Now I'm facing another issue thaton the first page load the CSS is applied, after page refresh the CSS applied is gone.

First load


After Refresh

Can anyone help me with this issue?

I'm attaching the OML for your reference


Thanks,

Gowtham



Datagrid_CSS_V1.oml
2023-03-08 10-32-19
Vinod Kumar R

Hi @Gowtham,


You can call the color code action in DataActionOnAfterFetch with some time delay.

Attached is the oml.

Regards,

Vinod

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