private void FillGrid(Grid grid, List <UInt32[]> Data, List <string> ColumnNames) { grid.BorderStyle = BorderStyle.FixedSingle; grid.ColumnsCount = ColumnNames.Count; grid.FixedRows = 1; grid.Rows.Insert(0); SourceGrid.Cells.Editors.ComboBox cbEditor = new SourceGrid.Cells.Editors.ComboBox(typeof(string)); cbEditor.StandardValues = new string[] { "Value 1", "Value 2", "Value 3" }; cbEditor.EditableMode = SourceGrid.EditableMode.Focus | SourceGrid.EditableMode.SingleClick | SourceGrid.EditableMode.AnyKey; int p = 0; foreach (var _column in ColumnNames) { grid[0, p] = new SourceGrid.Cells.ColumnHeader(_column); grid.Columns.SetWidth(p, 100); p++; } grid.Rows.Insert(1); grid.Rows[1].Height = dgvSgtFile.Height - 50; for (int q = 0; q < ColumnNames.Count; q++) { //ZedGraphControl ZDC = new ZedGraphControl(); //ZDC.GraphPane.Title.Text = ""; //ZDC.GraphPane.XAxis.Title.Text = ""; //ZDC.GraphPane.YAxis.Title.Text = ""; //CreateGraph(ZDC, GetSignal(Data, q)); PlotterDisplayEx PDE = new PlotterDisplayEx(); PDE.Smoothing = System.Drawing.Drawing2D.SmoothingMode.None; PDE.Refresh(); BuildGraph(PDE, GetSignal(Data, q)); grid[1, q] = new SourceGrid.Cells.CellControl(PDE); } //grid.AutoSizeCells(); }
private void RefreshGraph() { display.Refresh(); }