in datagrid 2, how to apply different colours to table data depending on the different attribute values

0
I want to apply three colours i.e. high, medium, low depending on the bigger, medium smaller values of attributes
asked
4 answers
2

The dynamic row class allows you to assign CSS classes to a row, by using an expression. 
If you want to apply the colors on a specific cell/column, you can use the dynamic cell class.
You can reuse existing CSSclasses like text-warning, text-danger and text-bold or define you own CSS class with a specific styliung.

https://docs.mendix.com/appstore/modules/data-grid-2/#52-dynamic-row-class

 

answered
1

Hi Vivek,

There is an option called Striped in the Appearance tab.
Allow yes and add styling to the table-striped class.

answered
0
///// dynamic row styling /////
.tr {
    display: contents;
    &.bg-primary .td {
        background-color: #337ab7;
    }
    &.bg-success .td {
        background-color: #dff0d8;
    }
    &.bg-warning .td {
        background-color: #fcf8e3;
    }
    &.bg-info .td {
        background-color: #d9edf7;
    }
}

 

answered
0
///// dynamic row styling /////
.tr {
    display: contents;
    &.bg-primary .td {
        background-color: #337ab7;
    }
    &.bg-success .td {
        background-color: #dff0d8;
    }
    &.bg-warning .td {
        background-color: #fcf8e3;
    }
    &.bg-info .td {
        background-color: #d9edf7;
    }
}

 

answered