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

This forum contains topics that were moved from Get Satisfaction
Dupdroid
Posts: 0
Joined: Sat Mar 30, 2013 9:07 pm

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

Post by Dupdroid »

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: 147
Joined: Tue Aug 27, 2013 1:47 pm

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

Post by Serhii Kulibaba »

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

Post by Dupdroid »

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

Post by Dupdroid »

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

Post by Dupdroid »

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: 69
Joined: Tue Mar 22, 2016 6:03 pm

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

Post by Galyna Abramovych »

Thank you for sharing this information with our community!

Post Reply