protected override void OnLoad(EventArgs e) { base.OnLoad(e); grid1.BorderStyle = BorderStyle.FixedSingle; grid1.ColumnsCount = 3; //grid1.FixedRows = 1; grid1.Rows.Insert(0); grid1[0, 0] = new EditableColumnHeader("String"); grid1[0, 1] = new EditableColumnHeader("DateTime"); grid1[0, 2] = new EditableColumnHeader("CheckBox"); for (int r = 1; r < 10; r++) { grid1.Rows.Insert(r); grid1[r, 0] = new SourceGrid.Cells.Cell("Hello " + r.ToString(), typeof(string)); grid1[r, 1] = new SourceGrid.Cells.Cell(DateTime.Today, typeof(DateTime)); grid1[r, 2] = new SourceGrid.Cells.CheckBox(null, true); } grid1.AutoSizeCells(); }
protected override void OnLoad(EventArgs e) { base.OnLoad (e); grid1.BorderStyle = BorderStyle.FixedSingle; grid1.ColumnsCount = 3; //grid1.FixedRows = 1; grid1.Rows.Insert(0); grid1[0,0] = new EditableColumnHeader("String"); grid1[0,1] = new EditableColumnHeader("DateTime"); grid1[0,2] = new EditableColumnHeader("CheckBox"); for (int r = 1; r < 10; r++) { grid1.Rows.Insert(r); grid1[r,0] = new SourceGrid.Cells.Cell("Hello " + r.ToString(), typeof(string)); grid1[r,1] = new SourceGrid.Cells.Cell(DateTime.Today, typeof(DateTime)); grid1[r,2] = new SourceGrid.Cells.CheckBox(null, true); } grid1.AutoSizeCells(); }