Blazor DataGrid Footer outside Grid

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>




3 Replies

MS Monisha Saravanan Syncfusion Team January 24, 2022 09:46 AM UTC

Hi Luis, 

Greetings from Syncfusion support. 

We are unable to reproduce the reported issue at our end. We need some more details about the requirement. So kindly share the following details to validate the reported query further at our end. 

  1. Share us the complete grid rendering code snippet with your customize styles if any.

  1. Share us the video demo showing the problem you are facing.

  1. Kindly share us the issue reproducing sample or reproduce the issue in the below provided sample.

 
The above requested details will be helpful for us to validate your query and to provide you with a better solution as early as possible. 

Regards, 
Monisha 



LR Luis Roberto January 24, 2022 06:41 PM UTC

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



VN Vignesh Natarajan Syncfusion Team January 25, 2022 03:51 AM UTC

Hi Luis,  

Thanks for the update.  

We are glad to hear that you have resolved your query on your own using our sample.  

Please get back to us if you have further queries. 

Regards, 
Vignesh Natarajan 


Loader.
Up arrow icon