Hi
I want a small clarification on one of the use case related to IgrDataGrid (https://es.infragistics.com/products/ignite-ui-react/react/components/grids/data-grid/overview).
I have used IgrDataGrid, in that when I try to set initial summary description with the following code snippet.
const summary: IgrColumnSummaryDescription[] = [];
const summaryColumn= new IgrColumnSummaryDescription(); summaryColumn.field = 'TestColumn'; summaryColumn.displayName = 'Test Display Name'; summaryColumn.calculatorDisplayName = ''; summaryColumn.operand = DataSourceSummaryOperand.Sum; summary.push(summaryColumn);
This is the code snippet I'm using , here I'm passing displayName = 'Test Display Name' and calculatorDisplayName as Empty string still I'm getting result TestColumn sum 555 , as displayName is 'Test Display Name' and calculatorDisplayName is Empty string so I'm expecting result like this Test Display Name 555
So, for this I need to know how can we achieve that , If there is any solution for this please suggest as I need to implement this in my IgrDataGrid.
Hoping for a positive response.
Thanks!!!
Hello Shubham,
From your description, it sounds like you are looking to show some custom text instead of “Sum” in the summary. You can do this using the calculatorDisplayName property of the IgrColumnSummaryDescription that you are defining. For example, using a summary of the following:
const peopleCount = new IgrColumnSummaryDescription(); peopleCount.field = "Photo"; peopleCount.operand = DataSourceSummaryOperand.Count; peopleCount.calculatorDisplayName = "THIS IS CALC DISPLAY NAME"; this.grid.summaryDescriptions.add(peopleCount);
This will result in a summary view like the attached screenshot. For reference, the sample that was modified with the above summary and shown in the screenshot is downloadable here: https://github.com/IgniteUI/igniteui-react-examples/tree/master/samples/grids/data-grid/overview.
Please let me know if you have any other questions or concerns on this matter.
Hello Andrew,
Thank you for your response. We have tried the same, but getting an issue here. The field name is also showing with the calculatorDisplayName in the final output.
I have set the groupSummaryDisplayMode="List" summaryScope="Groups"
Let me know if some other information is required from our end.
Thanks.