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.
Unfortunately, activation email could not send to your email. Please try again.

CustomSummary - CreateSummaryMethod Being Called But Not Shown on Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

16987 Jul 28,2004 11:34 AM Aug 2,2004 01:25 PM Windows Forms 3
loading
Tags: Grouping
Administrator [Syncfusion]
Asked On July 28, 2004 11:34 AM

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 08:32 AM

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 11:23 AM

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 01:25 PM

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

CONFIRMATION

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.

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.

;