PC Review


Reply
Thread Tools Rate Thread

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

 
 
Kim
Guest
Posts: n/a
 
      5th Jul 2008
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGridView processing at run time GaryDean Microsoft Dot NET Framework Forms 1 18th May 2007 08:20 AM
Datadrid bool column. touiss Microsoft VB .NET 1 25th Apr 2005 03:10 AM
Datadrid Rowchanged event =?Utf-8?B?WkFreQ==?= Microsoft Dot NET 0 21st Jul 2004 05:35 AM
datadrid to dataset orencs Microsoft ADO .NET 2 22nd Feb 2004 10:36 AM
DataDrid scroll to the bottom ??? Ofer B. Microsoft Dot NET Compact Framework 1 19th Nov 2003 04:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:06 PM.