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

Questions on the MarketSimulation Sample App...

Thread ID:

Created:

Updated:

Platform:

Replies:

62118 Jun 8,2007 01:45 AM UTC Jun 8,2007 04:24 PM UTC WinForms 2
loading
Tags: Grouping
SteveP
Asked On June 8, 2007 01:45 AM UTC

Hello,

I have downloaded and am evaluating the MarketSimulation sample application under the “Grid.Grouping samples” and I have the following questions:

- I have tried without success to add “summary rows” to the sample. Can someone shed some light on how to do that or point me to a specific sample that would work with this sample? I have followed other examples and inserted code snippets without success.
- Are the timer events that are being generated coming from a separate thread or are they really in the main thread? In order to plug in a real market data feed, the updates would be coming from a different thread which is why I’m asking. Also, are the components thread safe or do synchronization objects (e.g. critical sections) need to be place around access point in multithreaded apps?
- MarketSimulation is a “Designer-less” application... I noticed that the controls are created all in code and not through the visual design mode. Is there any benefit / drawbacks to doing it this way? I would assume that novices like myself would be better off with the design mode when learning how to use the product since all the attributes, etc. are visible.
- Putting CPU, memory, etc. aside, are there any limits to this control as far as how many rows, groups, etc. are allowed?
- Is it possible to add / delete rows on the fly after the initial load? If so, is there an example of that anywhere?

Thanks,

Steve

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

SteveP
Replied On June 8, 2007 04:24 PM UTC

Thanks, that helps a lot...

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.

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

;