471,335 Members | 1,460 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,335 software developers and data experts.

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

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
0 1060

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Rob | last post: by
1 post views Thread by Brian | last post: by
10 posts views Thread by Henok Girma | last post: by
7 posts views Thread by Mitchell S. Honnert | last post: by
2 posts views Thread by Steve Richter | last post: by
reply views Thread by jeastman - Hotmail | last post: by
6 posts views Thread by Miro | last post: by
3 posts views Thread by Andrus | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.