title: to check empty or null value in a cell of datagridview
body: <p>I want to check empty of null cell of datagridview . for that I am using following code , but it is flashing message even cells are filled. </p>
  
  <pre><code>private void dataGridView1_CellLeave(object sender, DataGridViewCellEventArgs e)
  {
      if (e.ColumnIndex == 5 || e.ColumnIndex == 6)
      {
  
          if (dataGridView1.CurrentCell.Value == null ||
              dataGridView1.CurrentCell.Value == DBNull.Value ||
              String.IsNullOrWhiteSpace(dataGridView1.CurrentCell.Value.ToString()))           
          {
              MessageBox.Show("Please enter  value");
          }
      }
  
  }
  </code></pre>
  
  <p>where is mistake ..</p>
  
  <p>thanks in advance ...</p>