GridView paging when using object arrays

K

Kevin Lawrence

Hi all

Got a GridView, I've enabled paging, I have 12 objects in an array with only
10 to display on each page, when I DataBind() for the first time it says
there are 2 pages, however when I click to go the 2nd page it just displays
the 1st page, unless I click it again, here is my event handler code - I'm
sure there's something missing:

protected void grdSubmittedCCDEV_PageIndexChanging(object sender, GridViewPageEventArgs
e)
{
grdSubmittedCCDEV.PageIndex = e.NewPageIndex;
}

Any ideas?

Thanks
Kev
 
K

Kris

Hi Kev,

Try using the below line.

grdSubmittedCCDEV.CurrentPageIndex = e.NewPageIndex;

Hope this help you.

Cheers,
Kris
 
K

Kevin Lawrence

Hi Kev,
Try using the below line.

grdSubmittedCCDEV.CurrentPageIndex = e.NewPageIndex;

Hope this help you.

Cheers,
Kris


There isn't a CurrentPageIndex - I should've mentioned this is version 2.0.

Kev
 

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

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,112
Latest member
VinayKumar Nevatia
Top