try this code on
private void textBox1_TextChanged(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand("select * from Table1 where FirstName Like '" + textBox1.Text + "%' ", con);
SqlDataAdapter da= new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
dataGridView1.DataSource = dt;
da.SelectCommand.ExecuteNonQuery();
con.Close();
}
Raj