For this you need to create the query and fill the dataset
You can write the query as
Select * from tablename where sName Like 'ABC%'
string q = "Select * from tablename where sName Like '" + txtname.Text + "%'"
fille the dataset with above query and bind it the grid
Hope this will help you