thanks you jmeckley for your help...I just did like you suggested to me but i am still getting an error message.here is my code and the error message
System.NullReferenceException: Object reference not set to an instance of an object.
Protected Sub gvitems_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs)
If e.Row.RowIndex > -1 Then
Dim ItemTotal As Decimal = CType(DataBinder.Eval(e.Row.DataItem, "EngineersEstimate"), Decimal)
Dim LowBd As Decimal = CType(DataBinder.Eval(e.Row.DataItem, "LowBid"), Decimal)
Dim AverageBid As Decimal = CType(DataBinder.Eval(e.Row.DataItem, "Average"), Decimal)
EstimateTotal += ItemTotal
LowBid += LowBd
Average += AverageBid
End If
If (e.Row.RowType = DataControlRowType.Footer) And (gvitems.PageIndex <> gvitems.PageCount - 1) Then
gvitems.FooterRow.Cells(0).ColumnSpan = 4
gvitems.FooterRow.Cells.RemoveAt(1)
gvitems.FooterRow.Cells.RemoveAt(2)
gvitems.FooterRow.Cells.RemoveAt(3)
'e.Row.Cells(4).Text = "Sub Totals >>"
e.Row.Cells(5).Text = EstimateTotal.ToString("c")
e.Row.Cells(6).Text = LowBid.ToString("C")
e.Row.Cells(7).Text = Average.ToString("C")
e.Row.Font.Bold = True
e.Row.ForeColor = Drawing.Color.White
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Left
End If
End Sub