protected void LoadData()
        {
            // In this prototype, the orders will not change... but the market data will
            OrderAgreementListC records = new OrderAgreementListC();

            for (int i = 0; i < Program.NumberOfRows; i++)
            {
                OrderAgreementC orderAgreement = OrderAgreementC.GenerateRandom();
                records.Add(orderAgreement);
            }

            DataTable table = GridC.CreateDataTable(records);

            grid.BindToCurrencyManager = false;
            grid.AllowSwapDataViewWithDataTableList = true;
            grid.DataSource = table;

            symbolColumn = grid.TableDescriptor.Fields["Symbol"];
            openColumn   = grid.TableDescriptor.Fields["Opn"];
            bidColumn    = grid.TableDescriptor.Fields["Bid"];
            askColumn    = grid.TableDescriptor.Fields["Ask"];
            lastColumn   = grid.TableDescriptor.Fields["Last"];

            // Cache symbol -> records map for faster market data updates
            int count = grid.Table.Records.Count;

            for (int n = 0; n < count; n++)
            {
                Record record = grid.Table.Records[n];
                string symbol = (string)record.GetValue(symbolColumn);
                if (symbol == null)
                {
                    continue;
                }

                RecordList recordList;
                if (symbolRecordMap.ContainsKey(symbol))
                {
                    recordList = symbolRecordMap[symbol];
                }
                else
                {
                    recordList = new RecordList();
                    symbolRecordMap.Add(symbol, recordList);
                }
                recordList.Add(record);
            }
            this.grid.GridVisualStyles     = GridVisualStyles.Metro;
            this.grid.GridOfficeScrollBars = OfficeScrollBars.Metro;
            quotesUpdateDelegate           = new QuoteManagerC.QuotesUpdatedDelegate(QuotesUpdate);
        }
 private void InitializeGrid()
 {
     this.grid = new MarketSimulation.GridC();
     this.panel1.Controls.Add(this.grid);
     //
     // grid
     //
     this.grid.Dock          = DockStyle.Fill;
     this.grid.BackColor     = System.Drawing.SystemColors.Window;
     this.grid.FreezeCaption = false;
     this.grid.Location      = new System.Drawing.Point(0, 0);
     this.grid.Name          = "grid";
     this.grid.Size          = new System.Drawing.Size(975, 632);
     this.grid.TabIndex      = 1;
     this.grid.Text          = "gridGroupingControl1";
 }
 private void InitializeGrid()
 {
     this.grid = new MarketSimulation.GridC();
     this.panel1.Controls.Add(this.grid);
     //
     // grid
     //
     this.grid.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                               | System.Windows.Forms.AnchorStyles.Left)
                                                              | System.Windows.Forms.AnchorStyles.Right)));
     this.grid.BackColor     = System.Drawing.SystemColors.Window;
     this.grid.FreezeCaption = false;
     this.grid.Location      = new System.Drawing.Point(0, 0);
     this.grid.Name          = "grid";
     this.grid.Size          = new System.Drawing.Size(975, 632);
     this.grid.TabIndex      = 1;
     this.grid.Text          = "gridGroupingControl1";
 }