Hi this is how I did mine but was calculating KM's
double tot = 0;
int _count = 0;
decimal _sumKillometers = 0.0M;
protected void grvTravelClaims_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label lblKM = (Label)e.Row.FindControl("lblKillometers");
decimal _Killometers = Decimal.Parse(lblKM.Text);
_sumKillometers += _Killometers;
_count += 1;
}
if (e.Row.RowType == DataControlRowType.Footer)
{
Label lblKM = (Label)e.Row.FindControl("lblTot");
double rate=Convert.ToDouble(txtRate.Text);
double sum=Convert.ToDouble(_sumKillometers);
lblKM.Text = (rate * sum).ToString();
}
}
Then thats how I called my event in the gridview
OnRowDataBound="grvTravelClaims_RowDataBound"