Dupdroid
Posts: 0
Joined: Sat Mar 30, 2013 9:07 pm

Ionic 4 - DataTable - Selected row styling - background-color

How do I customise the background-color of the DataTable's selected/active row?

Inspect Elements Styles:

.ngx-datatable.material.single-selection .datatable-body-row.active, .ngx-datatable.material.single-selection .datatable-body-row.active .datatable-row-group, .ngx-datatable.material.multi-selection .datatable-body-row.active, .ngx-datatable.material.multi-selection .datatable-body-row.active .datatable-row-group, .ngx-datatable.material.multi-click-selection .datatable-body-row.active, .ngx-datatable.material.multi-click-selection .datatable-body-row.active .datatable-row-group {
background-color: #304ffe;
color: #fff;
}

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Ionic 4 - DataTable - Selected row styling - background-color

Hello,

What do you mean with "the active row"? the row with the focused component or hovered by the pointer?

Dupdroid
Posts: 0
Joined: Sat Mar 30, 2013 9:07 pm

Ionic 4 - DataTable - Selected row styling - background-color

When you click on a row to make it selected.

See this tutorial: https://docs.appery.io/docs/ionic-4-n...

The default colour is blue when a row has been selected.

Dupdroid
Posts: 0
Joined: Sat Mar 30, 2013 9:07 pm

Ionic 4 - DataTable - Selected row styling - background-color

Please, can I get some help here?

Dupdroid
Posts: 0
Joined: Sat Mar 30, 2013 9:07 pm

Ionic 4 - DataTable - Selected row styling - background-color

FYI

:host
::ng-deep
.ngx-datatable.material:not(.cell-selection)
.datatable-body-row.active
.datatable-row-group{
background-color: #BFE222;
}

Galyna Abramovych
Site Admin
Posts: 84
Joined: Tue Mar 22, 2016 6:03 pm

Ionic 4 - DataTable - Selected row styling - background-color

Thank you for sharing this information with our community!

Return to “Issues”