title: Search and replace specific cell value in a datagridview
body: <p>I have a datagridview1 on a form, which contains number of columns and data. Here I need to find specific cells which contains the decimal value of "0.04" (for example), must be replaced with the numeric value of "0" by clicking single button.</p>
  
  <p>I have tried already this,</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
      string filterBy;
      filterBy = "Stringtext Like '%" + 0.04 + "%'";
      ((DataTable)dataGridView1.DataSource).DefaultView.RowFilter = filterBy;
      int rows = dataGridView1.Rows.Count;
      for (int i = 0; i &lt; rows-1; i++)
      {
          dataGridView1[2, i].Value = dataGridView1[2, i].Value.ToString().Replace(0.04, 0);     
      }
      dataGridView1.Refresh();
  }
  </code></pre>
  
  <p>no use, can anyone help..?</p>
  
  <p>thanks in advance..</p>