All pastes #446490 Raw Edit

Untitled

public text v1 · immutable
·published 2007-04-18 14:58 UTC
rendered paste body
Public Sub gridBidding_OnRowCreated(ByVal sender As Object, ByVal e As Web.UI.WebControls.GridViewRowEventArgs) Handles gridBidding.RowCreated

        If Not gridBidding.Rows.Count = 0 Then 'Check if there are rows, otherwise the app crashes.
            

            'This section of code changes the label in the "You are bidding on" table to say Yes or NO if
            'user is the highest bidder.

            Dim i As Integer = 0
         


            Dim QLabel As Label
            For i = 0 To gridBidding.Rows.Count - 1


                QLabel = CType(gridBidding.Rows(i).FindControl("Label1"), Label)




                If Not QLabel.Text = Session.Item("QSessionUsername") Then
                    QLabel.ForeColor = Drawing.Color.Red
                    QLabel.Font.Bold = True
                    QLabel.Font.Size = 12
                    QLabel.Text = "NO"
                Else
                    QLabel.Text = "Yes"
                End If

            Next



        End If

    End Sub