Private Sub AddCheckBox(ByVal pos As Integer, ByRef grd As DataGridView)
'grd.Columns.Clear()
'grd.Rows.Clear()
Dim column As New DataGridViewCheckBoxColumn()
With column
.AutoSizeMode = DataGridViewAutoSizeColumnMode.DisplayedCells
.FlatStyle = FlatStyle.Standard
.CellTemplate = New DataGridViewCheckBoxCell()
.CellTemplate.Style.BackColor = Color.Beige
.Name = "c_" + pos.ToString()
End With
grd.Columns.Insert(pos, column)
End Sub
No comments:
Post a Comment