The custom agreggate does not respect the associated column.

I have defined the custom sum of elements, but they are not placed in the indicated column. There are 3 grids on the same screen, and it happens with all of them

Captura de pantalla-20240815220408-1572x248.png

aggregates: [ { columns: [ { type: "Custom", customAggregate: totalProducts, columnName: "cantidad", footerTemplate: "${Custom}", }, ] } 

I managed to solve it for the first grid with the following code.

  document.querySelectorAll('.e-summarycell:not(.e-hide)').forEach(function(element) { element.style.display = 'table-cell'; });Captura de pantalla-20240815221628-1572x227.png

Reviewing the code it produces, the e-summarycell places this style="display: none;"


1 Reply

AR Aishwarya Rameshbabu Syncfusion Team August 16, 2024 12:15 PM UTC

Hi Héctor Reyes,


Greetings from Syncfusion support.


Upon reviewing your query, we have identified that you are facing and issue where the aggregates in the Syncfusion Grid columns are not rendered correctly for the specified columns. To proceed with a solution, we require some additional information. So, please provide the following details:


1. From the shared screenshot and code example, we noticed an aggregate defined for the 'cantidad' column. Additionally, there are multiple columns with the same name 'cantidad'. Please explain the use case of this duplication.

2. Provide the complete Grid rendering code along with any event handler functions used for the three Grids you are utilizing.

3. Share the code lines defining the custom aggregate function and the aggregate column definition. If separate functions are used for each, please share all of them.

4. Specify the version of the Syncfusion package you are currently using.


We have created a simple sample containing three Grids with custom aggregates, where the aggregates are rendered correctly for the specified column. Please refer to the provided sample and screenshot.


Sample: https://stackblitz.com/edit/fuvvic-vvnztc?file=index.html,index.js


Screenshot:


Try to replicate the reported issue using the above sample or provide a simple issue replication sample with a screenshot of each grid explaining the issue.

Providing these details will help us offer an optimal solution as soon as possible.



Regards

Aishwarya R


Loader.
Up arrow icon