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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grouping Engine events

Thread ID:





45078 Jun 9,2006 04:52 PM UTC Jun 23,2006 04:12 PM UTC WinForms 6
Tags: Grouping
Eric Weber
Asked On June 9, 2006 04:52 PM UTC

Please see the comments in the attached application for my questions. Thanks, Eric


Administrator [Syncfusion]
Replied On June 12, 2006 12:59 PM UTC

Hi Eric, Try calling the engine.Table.FixTopLevelCounters(); to invalidate the counters in the tradeList.ListChanged event handler and call the RefreshRecapAndTotals() method only in the engine.SourceListListChangedCompleted event handler. The GridGroupingControl by default get affected when its sourcelist list changes and the Datasource property is not needed to be reset every time. void tradeList_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e) { engine.Table.FixTopLevelCounters(); } void engine_SourceListListChangedCompleted(object sender, TableListChangedEventArgs e) { RefreshRecapAndTotals(); } Regards, Calvin.

Eric Weber
Replied On June 12, 2006 04:28 PM UTC

thanks! works great!

Eric Weber
Replied On June 20, 2006 02:32 AM UTC

New problem now... Run this sample app and type in 555,555,555,555 into the shares field, and 5.00 into the price field, then click the add button. The values that you just typed in should show up in the recap grid, and be included in the average price and total shares. The shares quantity chokes in the grouping engine. Not sure why. Is the value too big? (i hope not) When I debug the RefreshRecapAndTotals() method, I can see the record element with the correct price and shares. But then the SummarySection element changes the share quantity to zero?!?!?! Any ideas? Thanks, Eric


Eric Weber
Replied On June 22, 2006 05:58 PM UTC

anyone out there?

Administrator [Syncfusion]
Replied On June 22, 2006 07:37 PM UTC

Hi Eric, Yes, the value 555,555,555,555 is to too big to be an Int32! Set the TotalShares’s SummaryType to DoubleAggregate instead of Int32Aggrregate in the SetupGroupingEngine() and the SetupSummaryEngine(). .TableDescriptor.Summaries.Add("TotalShares", "Shares", SummaryType.DoubleAggregate); And also change the cast type for the totalShares to DoubleAggregate, and the summary2 to DoubleAggregateSummary type in the RefreshRecapAndTotals method. DoubleAggregateSummary ts = totalShares as DoubleAggregateSummary; DoubleAggregateSummary summary2 = summaries[sdc.IndexOf(sdc["TotalPrice_X_Shares"])] as DoubleAggregateSummary; Warm Regards, Calvin.

Eric Weber
Replied On June 23, 2006 04:12 PM UTC

duh.....stupid me.....thanks for your help!


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

or the page will be automatically redirected to 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