01.
If
ds1.Tables(
"test"
).Rows.Count > 0
Then
02.
GridView1.DataSource = ds1.Tables(
"test"
)
03.
GridView1.DataBind()
04.
GridView1.ShowFooter =
True
05.
GridView1.Visible =
True
06.
Else
07.
Dim
source
As
New
ArrayList()
08.
source.Add(
New
Table())
09.
GVAdd.DataSource = source
10.
GVAdd.DataBind()
11.
Dim
columnsCount
As
Integer
= GVAdd.Columns.Count
12.
GVAdd.Rows(0).Cells.Clear()
13.
GVAdd.Rows(0).Cells.Add(
New
TableCell())
14.
GVAdd.Rows(0).Cells(0).ColumnSpan = columnsCount
15.
16.
GVAdd.Rows(0).Cells(0).Text =
" .....ไม่พบข้อมูลกรุณาเพิ่มข้อมูลพฤติกรรม...."
17.
18.
GVAdd.Visible =
True
19.
End
If