Hi there,

Ok - So I created this simple example. I have dataGridView control which I have added some dataColums to... Check ehm out! Notice that the last on is of type boolean!

vb Code:
  1. DataTable dt = new DataTable();
  2.             DataColumn dcId = new DataColumn();
  3.             dcId.ColumnName = "ComplexId";
  4.             dcId.DataType = System.Type.GetType("System.Int64");
  5.             dt.Columns.Add(dcId);
  6.  
  7.             DataColumn dcName = new DataColumn();
  8.             dcName.ColumnName = "ComplexName";
  9.             dcName.DataType = System.Type.GetType("System.String");
  10.             dt.Columns.Add(dcName);
  11.  
  12.             DataColumn dcTrueFalse = new DataColumn();
  13.             dcTrueFalse.ColumnName = "True/False\nLook! Two lines...";
  14.             dcTrueFalse.DataType = System.Type.GetType("System.Boolean");
  15.             dt.Columns.Add(dcTrueFalse);
  16.  
  17.             DataRow row = dt.NewRow();
  18.             row["ComplexId"] = 100;
  19.             row["ComplexName"] = "100%";
  20.             dt.Rows.Add(row);
  21.  
  22.             dgSearchResults.DataSource = dt;

That's all spiffy - and just for test purposes I want to check and see what they values are when you select the row, the code is below
vb Code:
  1. private void dgSearchResults_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
  2.         {
  3.             //MessageBox.Show(dgSearchResults.SelectedRows[0].Cells[0].Value.ToString());
  4.             for (int i = 0; i < dgSearchResults.SelectedRows[0].Cells.Count; i++)
  5.             {
  6.                 MessageBox.Show(dgSearchResults.SelectedRows[0].Cells[i].Value.ToString() + "\nCurrnet index: " + dgSearchResults.SelectedRows[0].Cells[i].ToString());
  7.             }
  8.         }

only problem is - how can I figure out if the last datacolumn is checked? It doesn't show anything when I run though the array of cells? Am I going abou t this in the wrong way? Is there a more efficient way to do this?

Thanks!