' ' declare footer variables ' Dim _numPeople AsInteger = 0 Dim _LessBase80 AsInteger = 0 Dim _NotApproved AsInteger = 0 Dim _Approved AsInteger = 0
ProtectedSub gvPostingStatus_DataBinding(ByVal sender AsObject, ByVal e As System.EventArgs) Handles gvPostingStatus.DataBinding ' ' This is called when the ' grid starts to be displayed ' _numPeople = 0 _LessBase80 = 0 _NotApproved = 0 _Approved = 0 EndSub
ProtectedSub gvPostingStatus_RowDataBound(ByVal sender AsObject, ByVal e As C1.Web.Wijmo.Controls.C1GridView.C1GridViewRowEventArgs) Handles gvPostingStatus.RowDataBound ' ' this is executed once each time a ' row on the grid is being rendered '
If (e.Row.RowType = C1.Web.Wijmo.Controls.C1GridView.C1GridViewRowType.DataRow) Then _numPeople += e.Row.Cells(3).Text _LessBase80 += e.Row.Cells(4).Text _NotApproved = e.Row.Cells(5).Text _Approved = e.Row.Cells(6).Text
' here is an alternate method using the business boject bound to the gridview
Dim status As SASD_Employee.boPostingStatus _ = CType(e.Row.DataItem, SASD_Employee.boPostingStatus)
ProtectedSub gvPostingStatus_DataBound(ByVal sender AsObject, ByVal e As System.EventArgs) Handles gvPostingStatus.DataBound ' ' This is called at the end all the data ' has retreived from teh grid ' gvPostingStatus.Columns(3).FooterText = _numPeople gvPostingStatus.Columns(4).FooterText = _LessBase80 gvPostingStatus.Columns(5).FooterText = _NotApproved gvPostingStatus.Columns(6).FooterText = _Approved EndSub