AD
Administrator
Syncfusion Team
June 8, 2007 09:10 AM UTC
1) You need to change this property setting in GridC.cs.
TableDescriptor.ChildGroupOptions.ShowSummaries = true;// false;
And then make the OnLoad in OrderAgrQueueementrCtr.cs look like this:
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
GridSummaryColumnDescriptor scd = new GridSummaryColumnDescriptor("totalQuantity", SummaryType.Int32Aggregate, "Quantity", "{Sum}");
GridSummaryColumnDescriptor scd1 = new GridSummaryColumnDescriptor("bidAverage", SummaryType.DoubleAggregate, "Bid", "{Average}");
GridSummaryRowDescriptor srd = new GridSummaryRowDescriptor("summaryrow1", "Aggregates:", new GridSummaryColumnDescriptor[] { scd, scd1 });
srd.Appearance.SummaryFieldCell.HorizontalAlignment = GridHorizontalAlignment.Right;
grid.TableDescriptor.SummaryRows.Add(srd);
BeginInvoke(new MethodInvoker(subscribeQuotes));
}
2) The updating of the data is being done on a separate thread from the UI thread and raises an event from the non-UI thread when an update should take place. The event handler in the UI thread, Manager_QuotesUpdate, then invokes that code that actually interacts with the grid on the UI thread. The GridGroupingControl, like any Windows Forms Control derived class is not thread safe. The only thread-safe calls for a Control derived class are Control.InvokeRequired, Control.Invoke and Control.BeginInvoke.
3) Designer, no designer? It is a matter of what you feel comfortable using. Some people like to see all the steps required to create and setup a control in a single place as they think it is easier to understand exactly what is being done and what is necessary.
4) There are no apriori limits (except things like Int.MaxValue and double.MaxValue for integers and doubles). But there are practical limits that really depend upon the hardware and the things you are trying to support. The best thing to do is to mock up a datasource that reflects your average case and worst case situation running on the target hardware to see if things are practical or not.
5) Yes. The Syncfusion\EssentialStudio\5.1.1.0\Windows\Grid.Grouping.Windows\Samples\2.0\PerformanceSamples\GroupingPerf sample lets you measure the performance of inserting/deleting/changing blocks of records in a GridGroupingCOntrol.
ST
SteveP
June 8, 2007 04:24 PM UTC
Thanks, that helps a lot...