vb.net - Checkbox in a DataGridView column is not getting checked sometimes? -
I use this code to check all the check boxes in the data grid view in VB.NET (-) , I / O (DataGridView.Rows.Count - 1) DataGridView.Rows (i) .Cell (0) .Value = True next to I = 0 as integer for
/ Code> Sometimes when a line is selected (not checked but only the full line is selected), while this code is running, except the selected one, all the other columns Checkbox checks. What's wrong here?
I also try to add this code,
DataGridView.SelectedCells (0) .mail (0) .Value = true
did not work.
As I said in the comment, this issue is that the box is checked on the data source , But the GUI has not refreshed it to reflect that room. If you turn it off, then the cell should be changed / refreshed in its new value. After making changes to your data, you should deselect the cells / rows at the very end you can:
Datagridview.ClearSelection ()
< P> or Datagridview.CurrentCell = Nothing can be deleted
You get this idea. This is what works for me in the past
Comments
Post a Comment