Hi Guys, I have a DataGrid with Height="100%" in order to fill the whole div and the Grid has a GridAggregateColumn to Sum a Column total, but the Aggregate Column is placed outside the div that contains the Grid, as if it were not part of the grid.
Is it normal?
Thanks
<SfGrid ID="Grid1" DataSource="@AfianzadorasPendientesDePago" AllowSorting="true" Height="100%" AllowTextWrap="true">
<GridTextWrapSettings WrapMode="WrapMode.Content"></GridTextWrapSettings>
<GridAggregates>
<GridAggregate>
<GridAggregateColumns>
<GridAggregateColumn Field=@nameof(ClienteAfianzadoraPendienteDePagoDto.Total) Type="AggregateType.Sum" Format="C2">
<FooterTemplate>
@{
var aggregate = (context as AggregateTemplateContext);
<div>Total: @aggregate.Sum</div>
}
</FooterTemplate>
</GridAggregateColumn>
</GridAggregateColumns>
</GridAggregate>
</GridAggregates>
<GridColumns>
<GridColumn Field=@nameof(ClienteAfianzadoraPendienteDePagoDto.Afianzadora) HeaderText="Afianzadora" Width="60" TextAlign="TextAlign.Left"></GridColumn>
<GridColumn Field=@nameof(ClienteAfianzadoraPendienteDePagoDto.Total) HeaderText="Total" Width="40" TextAlign="TextAlign.Left" Format="C2" CustomAttributes="@(new Dictionary<string, object>(){ { "class", "e-attr" }})" ></GridColumn>
</GridColumns>
</SfGrid>
Hi guys thank you very much for the sample program I found the problem, it is the first time I load the grid because it takes time to consult the database, my code draws the grid occupying 100% of the height and then when the data came generates the footer.
I corrected it by conditioning it to show the grid until the data is is fetched from the database.
Thank you very much for your valuable help.
Take care