Use a
BindingSource
to bind the data to the
DataGridView
and set the
Filter
property of the
BindingSource
in the
TextChanged
event as below
BindingSource bindingSource1 = new BindingSource();
bindingSource1.DataSource = dt;
private void textBox1_TextChanged(object sender, EventArgs e)
{
bindingSource1.Filter = string.Format("File_Name like '%{0}%'",textBox1.Text.Trim());
}