summary of the gridview
<p>I need gridview summary on footer...</p>

<pre><code> protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
 {
        decimal totalPrice = 0M;
        int totalItems = 0;
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            Label lblPrice = (Label)e.Row.FindControl("lblPrice");
            decimal price = Decimal.Parse(lblPrice.Text); 
            totalPrice += price;
            totalItems += 1; 
        }
        if (e.Row.RowType == DataControlRowType.Footer)
        {
            Label lblTotalPrice = (Label)e.Row.FindControl("lblTotalPrice");
            lblTotalPrice.Text = totalPrice.ToString(); 
        }
 }
</code></pre>

<p>But its not working. Any ideas?</p>
