Beispiel #1
0
        public DealsControl()
        {
            InitializeComponent();

            object[,] TextColumns = new object[, ]
            {
                { "Product", "Product", ThreadedDataGridView.Tags.Product },
                { "Position", "Position", null },
                { "Contract", "Contract", null },
                { "Rate", "Rate", null },
                { "Now", "Now", null },
                { "Profit", "Profit", null },
                { "Date", "Date", null },
                { "Confirmation", "Confirmation", ThreadedDataGridView.Tags.Key }
            };

            TdgvDeals.AddTextColumns(TextColumns, false);
            //TdgvDeals.AddButtonColumns("Close", "Close", ThreadedDataGridView.KeyTag, false);
            TdgvDeals.ClearRows(false);

            TdgvDeals.VisibleColumn("Confirmation", false, false);
            //TdgvDeals.VisibleColumn(" ", false, false);

            TdgvDeals.DGV.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
            TdgvDeals.AutosizeColumnMode("Date", DataGridViewAutoSizeColumnMode.Fill, false);


            this.BtnCloseSelected.Click += BtnCloseSelected_Click;
            this.BtnLiquidateAll.Click  += BtnLiquidateAll_Click;
            this.BtnClosePosition.Click += BtnClosePosition_Click;
        }