decimal a = 0;
Int32 y = GridView1.Items.Count;
for (Int32 i = 0; i < y ; i++)
{
a = a + Convert.ToDecimal(((Label)GridView1.Items[i].FindControl("lbl_subtoprice")).Text.ToString());
}
lbl_grandtotal.Text = Convert.ToString(a);
lbl_subtopricel id of your durations values
and
lbl_grandtotal is id of label in footer