So i have a gridview showing some orders from my database and i would like to refresh my gridview after someone searches an order in a textbox i have to search but i cant do it as i am doing it right know because i already have a gridview loaded.

CS

```
public void refreshdata()
        {
            SqlCommand cmd = new SqlCommand("select DISTINCT No_ from [Encomenda]", con);
            SqlDataAdapter sda = new SqlDataAdapter(cmd);
            DataTable dt = new DataTable();
            sda.Fill(dt);
            GridView1.DataSource = dt;
            GridView1.DataBind();
        }

         protected void btnsearch_Click(object sender, EventArgs e)
    {
        con.Open();

        SqlCommand cmd = new SqlCommand("select DISTINCT No_ from [encomenda] where No_= @No_", con);

        cmd.Parameters.AddWithValue("@No_", txtSearch.Value);

        cmd.ExecuteReader();

            SqlDataAdapter sda1 = new SqlDataAdapter(cmd);
            DataTable dt = new DataTable();
            sda1.Fill(dt);
            GridView1.DataSource = dt;
            GridView1.DataBind();

        con.Close();
    }

        protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            GridView1.PageIndex = e.NewPageIndex;
            refreshdata();
        }

```