The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi, I have a grouping grid with Custom Summary objects derived from SummaryBase
My class is based on the TotalSummary sample class.
I can see lots of calls to
public static ISummary CreateSummaryMethod(SummaryDescriptor sd, Record record)
But the caption never actually shows my custom total - it just aggregates the values.
I put a breakpoint on the overridden ToString() function as used for tooltip effect and that never actually gets called either
Can anyone help?
ADAdministrator Syncfusion Team July 29, 2004 12:32 PM UTC
Did you create a GridSummaryRowDescriptor where the summaries can be shown?
For example see that code in the CustomSummary example:
GridSummaryColumnDescriptor sd1 = new GridSummaryColumnDescriptor();
sd1.Name = "QuantityTotal";
sd1.DataMember = "Quantity";
sd1.DisplayColumn = "Quantity";
sd1.Format = "{Total}";
sd1.SummaryType = SummaryType.Custom;
this.gridGroupingControl1.TableDescriptor.SummaryRows.Add(new GridSummaryRowDescriptor("Row 1", "Total", sd1));
Stefan
ADAdministrator Syncfusion Team August 2, 2004 03:23 PM UTC
I''ve investigated this further. Everthing appears to be set up correctly.
My handler is being called correctly:
public static void QueryCustomSummaryHandler(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridQueryCustomSummaryEventArgs e)
QueryCustomSummaryHandler is a static "factory" type method that works out which ITreeTableSummary CreateSummaryMethod(SummaryDescriptor sd, Record record) to call base on some rules.
The first time I call the factory everyhting runs OK.
Each subsequent time that I call it, I can see the correct CreateSummaryMethod being called but it actually displays the values from the very first factory method.
Is it possible that somewhere within the SummaryDescriptor object[s] there''s a singleton or similar that is not being reset????
Thanks
Jason
ADAdministrator Syncfusion Team August 2, 2004 05:25 PM UTC
Fixed it! I needed to call tableDescriptor.SummaryRows.Clear(); to clear any knowledge of previous CustomSummary objects