01.
Private
Sub
myGridView_RowDataBound(sender
As
Object
, e
As
GridViewRowEventArgs)
02.
03.
04.
05.
06.
07.
Dim
lblCustomerID
As
Label =
CType
(e.Row.FindControl(
"lblCustomerID"
),Label)
08.
IF
Not
IsNothing(lblCustomerID)
Then
09.
lblCustomerID.Text = e.Row.DataItem(
"CustomerID"
)
10.
End
IF
11.
12.
13.
Dim
lblName
As
Label =
CType
(e.Row.FindControl(
"lblName"
),Label)
14.
IF
Not
IsNothing(lblName)
Then
15.
lblName.Text = e.Row.DataItem(
"Name"
)
16.
End
IF
17.
18.
19.
Dim
lblEmail
As
Label =
CType
(e.Row.FindControl(
"lblEmail"
),Label)
20.
IF
Not
IsNothing(lblEmail)
Then
21.
lblEmail.Text = e.Row.DataItem(
"Email"
)
22.
End
IF
23.
24.
25.
Dim
lblCountryCode
As
Label =
CType
(e.Row.FindControl(
"lblCountryCode"
),Label)
26.
IF
Not
IsNothing(lblCountryCode)
Then
27.
lblCountryCode.Text = e.Row.DataItem(
"CountryCode"
)
28.
End
IF
29.
30.
31.
Dim
lblBudget
As
Label =
CType
(e.Row.FindControl(
"lblBudget"
),Label)
32.
IF
Not
IsNothing(lblBudget)
Then
33.
lblBudget.Text = FormatNumber(e.Row.DataItem(
"Budget"
),2)
34.
End
IF
35.
36.
37.
Dim
lblUsed
As
Label =
CType
(e.Row.FindControl(
"lblUsed"
),Label)
38.
IF
Not
IsNothing(lblUsed)
Then
39.
lblUsed.Text = FormatNumber(e.Row.DataItem(
"Used"
),2)
40.
End
IF
41.
End
Sub