DataGridView插入指定类型的列
插入DataGridViewCheckBoxColumn列
DataGridViewCheckBoxColumn column = new DataGridViewCheckBoxColumn();
{
column.HeaderText = "选中";
column.Name = isSelected;
column.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells;
column.FlatStyle = FlatStyle.Standard;
column.ThreeState = true;
column.CellTemplate = new DataGridViewCheckBoxCell();
column.CellTemplate.Style.BackColor = Color.Beige;
}
DataGridView1.Columns.Insert(0, column);
持续学习、持续收获才能带来持续的满足和快乐