diff --git a/projects/igniteui-angular/src/lib/grids/common/pipes.ts b/projects/igniteui-angular/src/lib/grids/common/pipes.ts
index 0415811d701..6bd196e10c1 100644
--- a/projects/igniteui-angular/src/lib/grids/common/pipes.ts
+++ b/projects/igniteui-angular/src/lib/grids/common/pipes.ts
@@ -86,6 +86,7 @@ export class IgxGridRowClassesPipe implements PipeTransform {
index: number,
mrl: boolean,
filteredOut: boolean,
+ _rowData: any,
_: number
) {
const result = new Set(['igx-grid__tr', index % 2 ? row.grid.evenRowCSS : row.grid.oddRowCSS]);
diff --git a/projects/igniteui-angular/src/lib/grids/grid/grid.component.html b/projects/igniteui-angular/src/lib/grids/grid/grid.component.html
index 60a59e5e728..b02f53aa3ac 100644
--- a/projects/igniteui-angular/src/lib/grids/grid/grid.component.html
+++ b/projects/igniteui-angular/src/lib/grids/grid/grid.component.html
@@ -94,13 +94,13 @@
diff --git a/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.html b/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.html
index 0809de8d337..da9c9e45052 100644
--- a/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.html
+++ b/projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.html
@@ -68,14 +68,14 @@
diff --git a/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid.component.html b/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid.component.html
index a3a05419774..b25854e66b7 100644
--- a/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid.component.html
+++ b/projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid.component.html
@@ -51,7 +51,7 @@
diff --git a/projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid.component.html b/projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid.component.html
index 47a184c076b..0387fc15233 100644
--- a/projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid.component.html
+++ b/projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid.component.html
@@ -71,13 +71,13 @@
diff --git a/src/app/hierarchical-grid/hierarchical-grid.sample.html b/src/app/hierarchical-grid/hierarchical-grid.sample.html
index 4bbf58636c2..44d9c700776 100644
--- a/src/app/hierarchical-grid/hierarchical-grid.sample.html
+++ b/src/app/hierarchical-grid/hierarchical-grid.sample.html
@@ -6,10 +6,10 @@
Sample One
style="display: block; width: 500px">
-
+ #hGrid [rowClasses]="rowClasses">
diff --git a/src/app/hierarchical-grid/hierarchical-grid.sample.scss b/src/app/hierarchical-grid/hierarchical-grid.sample.scss
new file mode 100644
index 00000000000..6dddbcf811e
--- /dev/null
+++ b/src/app/hierarchical-grid/hierarchical-grid.sample.scss
@@ -0,0 +1,5 @@
+:host::ng-deep {
+ .activeRow {
+ background-color: rgb(201, 241, 201);
+ }
+}
diff --git a/src/app/hierarchical-grid/hierarchical-grid.sample.ts b/src/app/hierarchical-grid/hierarchical-grid.sample.ts
index f1e547d500e..fa20d37069b 100644
--- a/src/app/hierarchical-grid/hierarchical-grid.sample.ts
+++ b/src/app/hierarchical-grid/hierarchical-grid.sample.ts
@@ -10,7 +10,7 @@ import {
@Component({
selector: 'app-hierarchical-grid-sample',
- styleUrls: ['hierarchical-grid.sample.css'],
+ styleUrls: ['hierarchical-grid.sample.scss'],
templateUrl: 'hierarchical-grid.sample.html'
})
export class HierarchicalGridSampleComponent implements AfterViewInit {
@@ -34,6 +34,11 @@ export class HierarchicalGridSampleComponent implements AfterViewInit {
public columns;
public childColumns;
+ public evenCondition = (row: RowType) => parseInt(row.data['ID'], 0) % 2 === 0;
+ public rowClasses = {
+ activeRow: this.evenCondition,
+ };
+
constructor(private cdr: ChangeDetectorRef) {
this.displayDensities = [
{ label: 'compact', selected: this.density === 'compact', togglable: true },