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
You can do something like this.
DataView dv1 = dtDefault.DefaultView; dv1.RowFilter = "CusGroupId=1 and CustomerCode LIKE '"+txtCustomer.Text +"%'"; DataTable dt=dv1.ToTable();