Hi,
I have a checkbox that is dynamically added to the datagridview.I would like to have the checked box checked automatically when it is created.I do not want to loop the datagridview to get the checked box checked which work like this:
Code:
this.dataGridView1.Rows[RowIndex].Cells[ColumnIndex].Value = true
I find no ways to do this.Below is my coding:
Code:
 DataGridView1.Columns.Add(CreateCheckBoxColumn)

    Private Function CreateCheckBoxColumn() As DataGridViewCheckBoxColumn
        Dim dataGridViewCheckBoxColumn1 _
            As New DataGridViewCheckBoxColumn()

        dataGridViewCheckBoxColumn1.HeaderText = "Insert"
        dataGridViewCheckBoxColumn1.TrueValue = True
        dataGridViewCheckBoxColumn1.FalseValue = False
        dataGridViewCheckBoxColumn1.IndeterminateValue = 3
        dataGridViewCheckBoxColumn1.ThreeState = True
        Return dataGridViewCheckBoxColumn1
        Return dataGridViewCheckBoxColumn1

    End Function

Does anyone has idea on dooing this?