Skip to content

Datagridview - Checkbox

gert d

Asked Jun 23, 2006, 12:31 AM EDT1 answer
Share
LinkedInX
Hello Everyone, I have a problem i can't fix . I have a datagridview with checkboxes in 1 column. Now the problem is that some checkboxes in a some rows have to be invisible. There is a property invisible, but this sets all checkboxes invisible. Is there a way to make a checkbox invisible in 1 cell ? Thanks in advance!

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Sorry for the empty thread, wrong reply button. I'm new here. How do you insert code properly ? Are there any tags ? Found the solution for my problem : private void dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e) { if (e.ColumnIndex == 0 && e.RowIndex == 1) e.PaintBackground(e.ClipBounds, true); else e.Paint(e.ClipBounds, DataGridViewPaintParts.All); e.Handled = true; }
    0