Hi Anderson,
Greetings from Syncfusion support.
Query:
Grid: hide header aggregator
Based on your shared details, we have checked your query. You have simply defined the GridAggregateColumn without specifying the Template details (GroupFooterTemplate and FooterTemplate).
We suggest You to define the required templates (GroupFooterTemplate and FooterTemplate) in GridAggregateColumn to overcome the reported case.
Refer to the below code example for your reference
|
<GridColumn Field="@nameof(OrcamentoItemOutputDTO.PercentualParticipacao)" HeaderText="Participação" Width="150" HeaderTextAlign="TextAlign.Right" TextAlign="TextAlign.Right" Type="ColumnType.Number" Format="n2" EditorSettings="@NumberEditParams" EditType="EditType.NumericEdit"> </GridColumn> </GridColumns> <GridAggregates> <GridAggregate> <GridAggregateColumns> <GridAggregateColumn Field=@nameof(OrcamentoItemOutputDTO.Data) Type="AggregateType.Count"> <GroupFooterTemplate> @{ var aggregate = (context as AggregateTemplateContext); <div> <p>Total units: @aggregate.Count</p> </div> } </GroupFooterTemplate>
</GridAggregateColumn> <GridAggregateColumn Field=@nameof(OrcamentoItemOutputDTO.Data) Type="AggregateType.Count">
<FooterTemplate> @{ var aggregate = (context as AggregateTemplateContext); <div> <p>Sum: @aggregate.Count</p> </div> } </FooterTemplate> </GridAggregateColumn> <GridAggregateColumn Field=@nameof(OrcamentoItemOutputDTO.MetaVenda) Type="AggregateType.Sum" Format="c2"> <GroupFooterTemplate> @{ var aggregate = (context as AggregateTemplateContext); <div> <p>Total units: @aggregate.Sum</p> </div> } </GroupFooterTemplate>
</GridAggregateColumn>
<GridAggregateColumn Field=@nameof(OrcamentoItemOutputDTO.MetaVenda) Type="AggregateType.Sum" Format="c2">
<FooterTemplate> @{ var aggregate = (context as AggregateTemplateContext); <div> <p>Sum: @aggregate.Sum</p> </div> } </FooterTemplate> </GridAggregateColumn> <GridAggregateColumn Field=@nameof(OrcamentoItemOutputDTO.PercentualParticipacao) Type="AggregateType.Sum" Format="n2"> <GroupFooterTemplate> @{ var aggregate = (context as AggregateTemplateContext); <div> <p>Total units: @aggregate.Sum</p> </div> } </GroupFooterTemplate>
</GridAggregateColumn> <GridAggregateColumn Field=@nameof(OrcamentoItemOutputDTO.PercentualParticipacao) Type="AggregateType.Sum" Format="n2">
<FooterTemplate> @{ var aggregate = (context as AggregateTemplateContext); <div> <p>Sum: @aggregate.Sum</p> </div> } </FooterTemplate> </GridAggregateColumn>
</GridAggregateColumns> </GridAggregate> </GridAggregates> </SfGrid>
@code {
SfGrid<OrcamentoItemOutputDTO> Grid; private string[] GroupedColumn = new string[] { "Dezena" };
List<OrcamentoItemOutputDTO> Data { get; set; }
protected override void OnInitialized() { Data = Enumerable.Range(1, 31).Select(x => new OrcamentoItemOutputDTO() { EmpresaId = 1, LojaId = 1, Data = DateTime.Now.AddDays(x), Dezena = x > 0 && x < 10 ? 1 : 2, MetaVenda = 1000M * x, PercentualParticipacao = 1.1256M * x,
}).ToList(); }
|
Please find the sample from the attachments for your reference.
Kindly get back to us if you need further assistance on this.
Regards,
Naveen Palanivel
thank you.
Hi Anderson,
Thanks for the update.
Please get back to us if you need further assistance.
Regards,
Rahul