Checkbox on Datagrid?
-
How can I place a checkbox in a column of the Datagrid in VB6? like what datagridview in .net can do..
Hi, The datagrid by default does not offer checkbox as a value for any of its cells. However I have created a work-around to get around this problem. I have placed a checkbox on the form and when the grid loads the checkbox is moved to the cell. Code attached:). ************ Private Sub Form_Load() 'on the form: 'one flexgrid (named= flex1) 'one checkbox (named= tb) Dim intX As Integer tb.Visible = False With flex1 .Columns(0).Width = 2000 .RowHeight = 300 tb.Caption = "Box" tb.Width = 500 tb.Move flex1.Left + 350, flex1.Top + 250, flex1.Width / 15, flex1.Height / 199 tb.BackColor = .BackColor tb.Visible = True End With End Sub ************
Gary Bigman. Software Engineer ComponentOne LLC www.componentone.com