Grouping Engine events
Please see the comments in the attached application for my questions.
Thanks,
Eric
GroupingWithDataGrid_2005.zip
GroupingWithDataGrid_2005.zip
SIGN IN To post a reply.
6 Replies
AD
Administrator
Syncfusion Team
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.
EW
Eric Weber
June 12, 2006 04:28 PM UTC
thanks! works great!
EW
Eric Weber
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
GroupingWithDataGrid_20050.zip
GroupingWithDataGrid_20050.zip
EW
Eric Weber
June 22, 2006 05:58 PM UTC
anyone out there?
AD
Administrator
Syncfusion Team
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.
EW
Eric Weber
June 23, 2006 04:12 PM UTC
duh.....stupid me.....thanks for your help!
SIGN IN To post a reply.
- 6 Replies
- 2 Participants
-
EW Eric Weber
- Jun 9, 2006 04:52 PM UTC
- Jun 23, 2006 04:12 PM UTC