Datagrid column style

JMIX 1.5
Hi everyone,
The requirement is to have all amount/ transactions columns to the right alignment. Is there a way to do it or do I have to customize the stylesheet?
Even if there is a JMIX function for it, please let me know how to style the Datagrid columns to the right alignment (only one or 2 specific columns, not all).
Thanks

Hi Tran,

=> For table, you can use table handler event:
@Install(to = “myTable”, subject = “styleProvider”)
private String myTableStyleProvider(Invoice entity, String property) {
if ( “invoiceValue”.equals(property)){
return “my-table-number-format”;
}
}

with css:
.my-table-number-format .v-table-cell-wrapper{
text-align: right !important;
}

=> For dataGrid, You can use column handler event : “styleProvider”. For example
@Install(to = “dataGrid.invoiceValue”, subject = “styleProvider”)
private String dataGridInvoiceValueStyleProvider(final Invoice invoice) {
return “my-data-grid-number-format”;
}
With css custom:
.v-grid {
.v-grid-cell.my-data-grid-number-format {
text-align: right !important;
}
}