Custom Datagrid

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
 
E

Elton Wang

Hi Red,

Where do you run BrowseTable() and what is your code in
PageChanged event?

Elton Wang
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top