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
Data Source
dtCustomer
DataTable.Select returns array of row, but you are binding entire data table not filtered rows. use this way or DataView
DataView
DataTable dtSearch = dtCustomer; var filter = dtSearch.Select("cust_Name like '" + txtSearch.Text + "%'"); grvCustomer.DataSource = filter.ToList();