By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,667 Members | 1,697 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,667 IT Pros & Developers. It's quick & easy.

Checkbos in datagridview are not defalt 2. time I use the datadrid

P: n/a
Hi all

I'm working with a column of checkbox in datagridview. I can mark the cells
defalut false 1. time by set thristate to false and varpmode to false too =>
all the cell are default false befor I change by set the cells. So first time
I mark 4 cells and get its right but if I take one of the 4 cells and
iterelate again the unmark cells is nor false but null and I get a exeption.

// Search in DataGridView checkbox
foreach (DataGridViewRow row in this.dataGridView.Rows)

// compare Select checkbox and RMS database value and
RMS DataGridView column
if (((bool)row.Cells[0].Value) == true &&
row.Cells[1].Value.ToString().Trim() == originalTarget)
{ // Matck found
return true;
}// No match found
return false;

So its first time I sacn 2. time the default seting don't work

Best regart
Kim S.
Jul 5 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.