hi folks,
How can I display the total value on the last page in the footer section with page that has paging is set to true..
below is my code..thank you
Protected Sub gvitems_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvitems.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim EnginnersTotal As Decimal = CType(DataBinder.Eval(e.Row.DataItem, "EngineersEstimate"), Decimal)
EnginersEstimateTotalTotal += EnginnersTotal
Else
If e.Row.RowType = DataControlRowType.Footer Then
'for the footer, display engineers estimate total
e.Row.Cells(4).Text = "Total"
e.Row.Cells(5).Text = EnginersEstimateTotalTotal.ToString("c")
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Right
End If
End If
End Sub
How can I display the total value on the last page in the footer section with page that has paging is set to true..
below is my code..thank you
Protected Sub gvitems_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvitems.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim EnginnersTotal As Decimal = CType(DataBinder.Eval(e.Row.DataItem, "EngineersEstimate"), Decimal)
EnginersEstimateTotalTotal += EnginnersTotal
Else
If e.Row.RowType = DataControlRowType.Footer Then
'for the footer, display engineers estimate total
e.Row.Cells(4).Text = "Total"
e.Row.Cells(5).Text = EnginersEstimateTotalTotal.ToString("c")
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Right
End If
End If
End Sub