Private Sub dgvInvent_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles dgvInvent.RowDataBound
lblTotalQty.Text = dgvInvent.Rows.Count
For Each dgvR As GridViewRow In dgvInvent.Rows
Dim lblStatus As Label = DirectCast(e.Row.FindControl("lblStatus"), Label)
If lblStatus.Text = "Inventory" Then
lblTotalInvent.Text = Convert.ToInt32(lblTotalInvent.Text) + 1
ElseIf lblStatus.Text = "Transfer" Then
lblTotalTransfer.Text = Convert.ToInt32(lblTotalTransfer.Text) + 1
ElseIf lblStatus.Text = "Reserve" Then
lblTotalReserve.Text = Convert.ToInt32(lblTotalReserve.Text) + 1
End If
Next
End Sub
Tag : .NET, Ms SQL Server 2008, Web (ASP.NET), VB.NET, VS 2010 (.NET 4.x)