Hi,
if I have set a datagriview as Virtualmode=true, and I add a column with checkbox, the checkbox do not receive click
is it normal?
Regards
Cristian
sorry if I did not explain well.
the checkbox that I have crate and place inside datagridview, are not checkable. is it normal, because it is in virtual mode?
I can’t understand what the code is expected to do. The checkbox is created and not shown or attached or assigned. Place it on a page or form and it will work. It’s not related to the DataGridViewCheckBoxColumn.
The datagrid sets VirtualMode on but doesn’t handle the data events. See https://docs.microsoft.com/en-us/dotnet/framework/winforms/controls/implementing-virtual-mode-wf-datagridview-control
Private Sub Window1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
DataGridView1.VirtualMode = True
DataGridView1.RowCount = 10
'aggiungo la colonna col checkbox per la selezione
Dim col As New DataGridViewCheckBoxColumn With {
.Name = "ck",
.Width = "30",
.ReadOnly = False,
.Resizable = False,
.FillWeight = 10
}
Dim ck As New CheckBox
ck.Dock = DockStyle.Fill
DataGridView1.Columns.Insert(0, col)
End Sub
Cannot reproduce without a test case.
Please login first to submit.