Data Table change cell background


I would like to know if there is a way to change the color background color using the “Data Table” ?
Maybe using the “On Records Created” but I don’t know how to do write it.

Thanks, Mario

Hello @Mario_Ghersi

You could open our SDK Styles at Theme tab

Find a data-table component with variables and use any of them to style your table.

@dataTablePrimaryColor: @themePrimary;
@dataTableDisabledColor: @disabledColor;

@dataTableBackground: @appBackgroundColor;

@dataTableScrollColor: fadeout(contrast(@dataTableBackground), 80%);

@dataTableColor: contrast(@dataTableBackground);
@dataTableBorder: @panelBorder;
@dataTableBorderRadius: @panelBorderRadius;
@dataTableShadow: @panelShadow;

@dataTableButtonColor: @dataTableColor;
@dataTableButtonColorActive: @dataTablePrimaryColor;

@dataTableTitleColor: NULL;

@dataTableSearchLabelColor: @dataTableDisabledColor;
@dataTableSearchTextColor: @dataTableColor;
@dataTableSearchButtonColorDisabled: transparent;

@dataTableInputUnderlineBorder: 1px solid @dataTableDisabledColor;
@dataTableInputUnderlineBorderHover: 1px solid @dataTableColor;
@dataTableInputUnderlineBorderActive: 2px solid @dataTablePrimaryColor;

@dataTableHeadCellColor: @dataTableColor;
@dataTableHeadCellSize: NULL;
@dataTableHeadCellBorder: 1px solid @dataTableDisabledColor;
@dataTableHeadSortLabelColor: inherit;
@dataTableHeadSortLabelColorActive: @dataTablePrimaryColor;

@dataTableBodyCellColor: NULL;
@dataTableBodyCellBorder: @dataTableHeadCellBorder;

@dataTableBodyRowBackgroundEven: NULL;
@dataTableBodyRowBackgroundOdd: NULL;
@dataTableBodyRowBackgroundHover: NULL;
@dataTableBodyRowBackgroundSelected: NULL;

@dataTablePaginationColor: @dataTableColor;

But if you want to style specific cells - that couldn’t be possible.

Regards, Dima.

Yes, my idea was to highlight specifics cells with some logic for the user, but will be necessary to build my own table.

Thanks, Mario