title: How to handle two datagridviews errors with one method?
body: <p>I have task to create method which have to handle two <code>DataGridView</code> errors and display them in screen.</p>
  
  <p>I have this method which works perfecetly when using one datagridview, but I how  can handle both datagridviews errors with one method?</p>
  
  <pre><code>public void gridErr(object sender, DataGridViewDataErrorEventArgs e)
  {
      // Don't throw an exception when we're done.
      e.ThrowException = false;
      // Display an error message.
      string txt = "Klaida su " + dataGridView1.Columns[e.ColumnIndex].HeaderText + "\n\n" + e.Exception.Message;
      MessageBox.Show(txt, "Klaida", MessageBoxButtons.OK, MessageBoxIcon.Error);
      // If this is true, then the user is trapped in this cell.
      e.Cancel = false;
  }
  </code></pre>
  
  <p>My friend told that it can be done by not using events.</p>