01.
Protected
Sub
GridView1_RowDataBound(
ByVal
sender
As
Object
,
ByVal
e
As
System.Web.UI.WebControls.GridViewRowEventArgs)
Handles
GridView1.RowDataBound
02.
03.
Dim
comment
As
Label =
DirectCast
(e.Row.FindControl(
"comment"
), Label)
04.
Dim
compost
As
Label =
DirectCast
(e.Row.FindControl(
"compost"
), Label)
05.
Dim
Label7
As
Label =
DirectCast
(e.Row.FindControl(
"Label7"
), Label)
06.
Dim
ImgPic
As
Image =
DirectCast
(e.Row.FindControl(
"ImgPic"
), Image)
07.
08.
If
(
Not
IsNothing(comment))
Then
09.
comment.Text = e.Row.DataItem(
"COMDETAIL"
)
10.
End
If
11.
If
(
Not
IsNothing(compost))
Then
12.
compost.Text = e.Row.DataItem(
"COMDATE"
)
13.
End
If
14.
If
(
Not
IsNothing(Label7))
Then
15.
Label7.Text = e.Row.DataItem(
"COMID"
)
16.
End
If
17.
If
(
Not
IsNothing(ImgPic))
Then
18.
19.
ImgPic.ImageUrl = (e.Row.DataItem(
"COMPIC"
)) แสดงรูป
20.
21.
22.
End
If
23.
24.
End
Sub