how to use cellValueChanged event in datadrid view to use filter function?
<p>I write a function to filter datagridview(dgv) </p>

<pre><code>void filterDataGridView(DataGridView dgv, string columnName, string filterValue)
{
    foreach (DataGridViewRow row in dgv.Rows)
    {
        if (row.Cells[columnName].Value.ToString().Contains(filterValue))
        {
            row.Visible = true;
        }
        else row.Visible = false;
    }
}
</code></pre>

<p>I have 2 dgv with same column!<br>
 . one of them is for searching in the secend dgv.<br>
I write this function for dgv1.<br>
first dgv has one row to write string in each column 
secend dgv contains data for searching.</p>

<p>please help me how can i use firs dgv ?-->(in each cell of dgv1 i write a string ,in dgv2 it be filter) how can i do that ? how can i set properties og dgv1 and what event will be helpful and how can i use it</p>

<p>thanks :)</p>
