Hello Team,
Please check snapshot attach, I need same type of format in Angular Grid component. How to achieve this.
|
App.component.html
<div class="control-section">
<ejs-grid #grid [dataSource]="data" [allowPaging]="true" [allowGrouping]="true" [pageSettings]='pageOption' [groupSettings]="groupSettings"
(dataBound)='dataBound()' (load)='load()'>
<e-columns>
<e-column field='CategoryName' headerText='Category Name' width='170'></e-column>
<e-column field='ProductName' headerText='Product Name' width='150'></e-column>
<e-column field='QuantityPerUnit' headerText='Quantity per unit' width='180' textAlign='Right'></e-column>
<e-column field='UnitsInStock' headerText='Units In Stock' width='150' textAlign='Right'></e-column>
<e-column field='Discontinued' width='170' textAlign="Center" [displayAsCheckBox]="true" type="boolean"></e-column>
</e-columns>
<e-aggregates>
<e-aggregate>
<e-columns>
<e-column type="Sum" field="UnitsInStock">
<ng-template #groupFooterTemplate let-data>Total units: {{data.Sum}}</ng-template>
</e-column>
<e-column type="TrueCount" field="Discontinued">
<ng-template #groupFooterTemplate let-data>Discontinued: {{data.TrueCount}}</ng-template>
</e-column>
</e-columns>
</e-aggregate>
<e-aggregate>
<e-columns>
<e-column type="Max" field="UnitsInStock">
<ng-template #groupCaptionTemplate let-data>Maximum: {{data.Max}}</ng-template>
</e-column>
</e-columns>
</e-aggregate>
</e-aggregates>
</ejs-grid>
</div> |
|
App.component.css
.e-grid .e-summaryrow .e-summarycell,
.e-grid .e-summaryrow .e-templatecell,
.e-grid .e-summarycontent .e-indentcell,
.e-grid .e-indentcell.e-detailindentcelltop {
background-color: forestgreen; // customize the summary rows
font-weight: bold;
} |