R
RedRed
Hi all,
I have datagrid problem. Im creating datagrid with the
code which allow the column header is set manually. This
is the code:
Public Sub BrowseTable(ByVal sqlStr As String, ByVal
field1 As ArrayList, field2 as arraylist)
Dim newCol As New BoundColumn
Dim aCount, colWidth As Integer
For aCount = 0 To field.Count - 1
newCol = New BoundColumn()
newCol.HeaderText = field1(aCount)
newCol.DataField = field2(aCount)
DGDTable.Columns.Add(newCol)
Next
DGDTable.PageSize = 5
DGDTable.PagerStyle.Mode = PagerMode.NumericPages
DGDTable.DataSource = dataset1
DGDTable.DataBind()
End Sub
DGDTable is datagrid.
When I calling this function its work normally but the
problem is when I click to the page 2 and so on the table
is blank. Since I have 100 data it suppose show me the
next page right, but its not.
It is because of my coding is wrong or I need to set
something. Thanks
I have datagrid problem. Im creating datagrid with the
code which allow the column header is set manually. This
is the code:
Public Sub BrowseTable(ByVal sqlStr As String, ByVal
field1 As ArrayList, field2 as arraylist)
Dim newCol As New BoundColumn
Dim aCount, colWidth As Integer
For aCount = 0 To field.Count - 1
newCol = New BoundColumn()
newCol.HeaderText = field1(aCount)
newCol.DataField = field2(aCount)
DGDTable.Columns.Add(newCol)
Next
DGDTable.PageSize = 5
DGDTable.PagerStyle.Mode = PagerMode.NumericPages
DGDTable.DataSource = dataset1
DGDTable.DataBind()
End Sub
DGDTable is datagrid.
When I calling this function its work normally but the
problem is when I click to the page 2 and so on the table
is blank. Since I have 100 data it suppose show me the
next page right, but its not.
It is because of my coding is wrong or I need to set
something. Thanks