We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CustomSummary - CreateSummaryMethod Being Called But Not Shown on Grid

Thread ID:





16987 Jul 28,2004 03:34 PM UTC Aug 2,2004 05:25 PM UTC WinForms 3
Tags: Grouping
Administrator [Syncfusion]
Asked On July 28, 2004 03:34 PM UTC

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?

Administrator [Syncfusion]
Replied On 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

Administrator [Syncfusion]
Replied On 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

Administrator [Syncfusion]
Replied On August 2, 2004 05:25 PM UTC

Fixed it! I needed to call tableDescriptor.SummaryRows.Clear(); to clear any knowledge of previous CustomSummary objects


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon