title: C# Get Value of DataGridView
body: <p>I got a problem with 2 DataGrid Views. Both are the same. the only different is, that the second one has a filter to sort out the closed cases.</p>
  
  <p><strong>So there are:</strong>
  faelleDataGridView
  faelleDataGridView2</p>
  
  <p>All I want is to select the value of the column "ID" of the selected row. After that it will open a new form were I set the varaible for the new filter (I only want to see entries whitch fit to the ID).</p>
  
  <p>This will start after i have made a double click on the cell.</p>
  
  <p>This is my source code:</p>
  
  <pre><code>        private void faelleDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
      { // This one is working with no errors
  
          if (e.RowIndex &gt;= 0)
          {
              FallDetail fFallDetail = new FallDetail();
              DataGridViewRow row = faelleDataGridView.Rows[e.RowIndex];
              //MessageBox.Show(row.Cells["ID"].Value.ToString());
              fFallDetail.fFilter = row.Cells["ID"].Value.ToString();
              fFallDetail.Show();
          }
  
      }
  
      private void faelleDataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
      { // This one will result an error
          if (e.RowIndex &gt;= 0)
          {
              FallDetail fFallDetail = new FallDetail();
              DataGridViewRow row = faelleDataGridView1.Rows[e.RowIndex];
              //MessageBox.Show(row.Cells["ID"].Value.ToString());
              fFallDetail.fFilter = row.Cells["ID"].Value.ToString();
              fFallDetail.Show();
          }
      }
  </code></pre>
  
  <p>After I have started the second one I got an error. It says, that he can not find the cell named "ID".</p>
  
  <p>The Error (translated from german): An exception error of the type "System.ArgumentException" is occurred at System.Windows.Forms.dll.</p>
  
  <p>Additional Information: The column ID could not be found.</p>
  
  <p>I have checked The ID column is only visible=false. But there is the same at the first datagridview.</p>
  
  <p>Do you have any idea how I can solve this problem or what I'm doing wrong?</p>
  
  <p>Thank you in advance.</p>
  
  <p><strong>Fixed the Problem by using the correct name in the properties</strong></p>
  
  <p>Greez Rok</p>