How I can forefully fire the rowcommand event when grid data is changing on every postback?
<p>My requirement is to refresh the data on every postback but if I do so my rowcommand event doesnot get fired on link button click in gridview? How I can achieve it?</p>

<p>I am changing the row order using jquery and saving the new order in hidden variable. on page postback I get the new order from hidden variable and rebinds the grid with new order.</p>

<p>I need to rebind the grid with new order everytime page postback. postback occurs when I click on edit/delete linkbuttons in grid but the rowcommand event doest not get fired.</p>

<pre><code>     protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
              string order = hdnOrder.Value.ToString();
               if (order != string.Empty)
               {
                ReOrder();
               } 
         }
       }

 protected void ReOrder()
        {
            DataTable dt = new DataTable();

            if (ViewState["data"] != null)
            {
                dt = (DataTable) ViewState["data"];

                string[] order = hdnOrder.Value.Split(',');

                for (int i = 0; i &lt; order.Length; i++)
                {
                    DataRow[] keyRows;

                    keyRows = dt.Select("ID='" + order[i] + "'");
                    if (keyRows.Length &gt; 0)
                    {
                        int index = dt.Rows.IndexOf(keyRows[0]);

                        dt.Rows[index].SetField("Precedence", i + 1);
                    }
                }
                DataView dv = dt.DefaultView;
                dv.Sort = "Precedence ASC";

                ViewState["data"] = dv.ToTable();

                grd.DataSource = ViewState["data"];
                grd.DataBind();
                hdnOrder.Value = string.Empty;
            }
        }
</code></pre>
