Posted on: 9/26/2012 12:57:21 AM | Views : 233

Hi Guys here i to do sum of the cells and show it in the footer.
I wrote in RowDataBound
protected void grdgrpkra112_RowDataBound(object sender, GridViewRowEventArgs e) { decimal Total = 0M; int totalItems = 0; if (e.Row.RowType == DataControlRowType.DataRow) { Label markLabel = (Label)e.Row.FindControl("Weightage"); int mark = Convert.ToInt32(markLabel.Text); Total += mark; totalItems += 1; } if (e.Row.RowType == DataControlRowType.Footer) { Label totalLabel = (Label)e.Row.FindControl("totalLabel"); totalLabel.Text = Total.ToString(); } } when i see on the screen it shows Zero (0) instead of sum of the total cells
kindly correct me here i am pasting my Markup Language Code...

 Go to the complete details ...