Hey Team,
I want to Create Below mention format in angular grid without expand/ collapse option using group feature.
| BRAND | ITEM | QTY |
| ABC | ITEM 1 | 10 |
| ABC | ITEM 2 | 25 |
| ABC | ITEM 3 | 15 |
| ABC TOTAL | 50 | |
| XYZ | NEW ITEM 1 | 9 |
| XYZ | NEW ITEM 2 | 12 |
| XYZ | NEW ITEM 3 | 27 |
| XYZ TOTAL | 48 | |
| Grand Total | 98 |
|
this.groupSettings = { showDropArea: false, columns: ['ShipCountry'] } |
|
<ejs-grid #grid [dataSource]="data" [allowGrouping]="true">
<e-aggregates>
<e-aggregate>
<e-columns>
<e-column type="Sum" field="Freight">
<ng-template #groupFooterTemplate let-data>Total units: {{data.Sum}}</ng-template>
</e-column>
</e-columns>
</e-aggregate>
<e-aggregate>
<e-columns>
<e-column type="Sum" field="Freight">
<ng-template #footerTemplate let-data>Grand total: {{data.Sum}}</ng-template>
</e-column>
</e-columns>
</e-aggregate>
</e-aggregates>
</ejs-grid> |
|
.e-grid .e-recordplusexpand {
visibility: hidden;
pointer-events: none;
}
.custom-header {
font-size: medium;
font-weight: 500;
background-color: orange;
}
.e-grouptopleftcell.e-lastgrouptopleftcell {
background-color: orange;
} |