grid View footer total in asp.net
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/7990661/gridview-with-footer-row-total-in-the-final-page-of-the-grid">gridview with footer row total in the final page of the grid</a>  </p>
</blockquote>



<pre><code>protected void inderGrid_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            decimal rowTotal = Convert.ToDecimal
            (DataBinder.Eval(e.Row.DataItem, "DC_No_Decimal"));
            //grdTotal = grdTotal + rowTotal;
            grdTotal += rowTotal;
        }
        if (e.Row.RowType == DataControlRowType.Footer)
        {
            Label lbl = (Label)e.Row.FindControl("lblTotal");
            e.Row.Cells[3].Text = grdTotal.ToString("c");
            //lbl.Text = grdTotal.ToString("c");
        }       
    }
</code></pre>

<p>this is the code i have in row gridview rowdatabound event, Here i m getting total for every page instead of getting total of every page i want to get at the final page of the gridview footer any one Help</p>
