01.
If
IsNothing(Session(
"dt"
))
Then
02.
dt.Clear()
03.
dt.Columns.Add(
"Pro_id"
)
04.
dt.Columns.Add(
"Pro_name"
)
05.
06.
dt.Columns.Add(
"Pro_type"
)
07.
08.
Else
09.
dt = Session(
"dt"
)
10.
End
If
11.
12.
13.
14.
Dim
row
As
DataRow
15.
row = dt.NewRow
16.
row(
"Pro_id"
) = e.Item.Cells(0).Text
17.
row(
"Pro_name"
) = e.Item.Cells(1).Text
18.
19.
row(
"Pro_type"
) = e.Item.Cells(2).Text
20.
Session.Contents(
"PID"
) = row(
"Pro_id"
)
21.
22.
23.
24.
dt.Rows.Add(row)
25.
dt.AcceptChanges()
26.
27.
28.
29.
30.
Session(
"dt"
) = dt
31.
Me
.DGProduct.DataKeyField =
"Pro_id"
32.
Me
.DGProduct.DataSource = dt.DefaultView
33.
Me
.DGProduct.DataBind()
34.
Me
.DGProduct.Visible =
True
35.