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 following code
DataTable dtSearch = dtCustomer;
dtSearch.Select("cust_Name like '" + txtSearch.Text + "%'");
grvCustomer.DataSource = dtSearch;
But this is not working.
If any body knows the solution please share.
Try this:
And check whatever there is space to be removed by triming the text.