 <p>You cannot get the data from grid for searching, you need to store you data some where for using search. That is to store in a ViewState, Session or call DataBase on every search. Bellow code show data stored in a ViewState, you can acces your data any time by just using GridViewData where you can done search. (if you have very large amount of data first preference is calling data from database on every search.)</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GridView1.DataSource = GridViewData; GridView1.DataBind(); } } public DataSet GridViewData { get { if (ViewState["GridViewData"] == null) { String str = "select * from tblEmployee where (Name like '%' + @search + '%')"; SqlCommand xp = new SqlCommand(str, objsqlconn); xp.Parameters.Add("@search", SqlDbType.NVarChar).Value = TextBox1.Text; objsqlconn.Open(); xp.ExecuteNonQuery(); SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = xp; DataSet ds = new DataSet(); da.Fill(ds, "Name"); objsqlconn.Close(); ViewState["GridViewData"] = ds; } return (DataSet)ViewState["GridViewData"]; } } </code></pre>