DataGrid Paging Problem

Hi guys, im using a datagrid to disply data from a sql database. I've set the paging properties, however when I ctrl + F5 my program the and click the paging button, nothing happens, it just returns the same page.

The paging properties that I have set on my datagrid are:

allow paging (checked)
page size = 5 rows
show page navigation buttons (checked)
position = bottom
mode = page numbers

im using microsoft visual 2003 (c#) my project is an webform


  • You will need to rebind the data set to the data grid with the new page number.

    so for the pageIndexChanged event it would be something like:

    dim ds as new DataSet
    DataGrid1.CurrentPageInder = e.NewPageIndex
    datagrid1.dataSource = ds

    sorry for it being in VB but you should get the idea
  • Thanks...worked perfectly
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!