I have a Datagridview and the Data Source is dtCustomer
I just want to filter the content of grid view based on a search text.
Itried the follow
I think this is what you're looking for?
//DataTable dtSearch = dtCustomer;
//dtSearch.Select("cust_Name like '" + txtSearch.Text + "%'");
grvCustomer.DataSource = dtCustomer.Select("cust_Name like '" + txtSearch.Text + "%'");
And when you want to go back to the original data
grvCustomer.DataSource = dtCustomer;