DataGrid Paging Problem - Programmers Heaven

Howdy, Stranger!

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


DataGrid Paging Problem

airwalkerairwalker Posts: 71Member
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


  • sniderwsniderw Posts: 2Member
    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
  • airwalkerairwalker Posts: 71Member
    Thanks...worked perfectly
Sign In or Register to comment.