Reason is :You are finding a Label which is not defined in footer template. You defined "lblTotalhours" Label in footer but finding "WorkHrs"
Here is your solution:
protected void grvList_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[0].Text = (e.Row.RowIndex + 1).ToString();
}
else if (e.Row.RowType == DataControlRowType.DataRow)
{
Label WORKHRS = (Label)e.Row.FindControl("WORKHRS");
int qty = Int32.Parse(WORKHRS.Text);
total = total + qty;
}
else (e.Row.RowType == DataControlRowType.Footer)
{
Label lblTotalhours = (Label)e.Row.FindControl("lblTotalhours");
lblTotalhours.Text = total.ToString();
}
}