Paging Stops working?

R

Rob

Hey yall.
I have a datagrid returning over 13K records, so obvious to do paging
right?
well I also have template/button columns in the grid so originally, I
was having the problem of the item command event firing before paging
and paging was not working at all,

To fix that, I added If e.Item.ItemIndex > -1 Then itemcommand code...
to my item event sub and now paging works.. well sort of,

Now after the first click of next page, the paging stops working, when
I click on Next it refreshes but does not refresh the data to the next
set it stays the same , I have simple code in the PageIndexChanged
event.. Me.dataGrid.CurrentPageIndex = e.NewPageIndex
dataGrid.DataBind()

any advice as always appreciated.
 
M

Michelle Hlaing

--------------------
From: (e-mail address removed) (Rob)
Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
Subject: Paging Stops working?
Date: 12 May 2004 09:02:08 -0700
Hey yall.
I have a datagrid returning over 13K records, so obvious to do paging
right?
well I also have template/button columns in the grid so originally, I
was having the problem of the item command event firing before paging
and paging was not working at all,

To fix that, I added If e.Item.ItemIndex > -1 Then itemcommand code...
to my item event sub and now paging works.. well sort of,

Now after the first click of next page, the paging stops working, when
I click on Next it refreshes but does not refresh the data to the next
set it stays the same , I have simple code in the PageIndexChanged
event.. Me.dataGrid.CurrentPageIndex = e.NewPageIndex
dataGrid.DataBind()

any advice as always appreciated.

Hi there,

There are a few examples online that you can have a look at:

http://msdn.microsoft.com/library/d...ghdisplayingdatainlistboxesonwebformspage.asp
http://msdn.microsoft.com/library/d...cifyingpagingbehaviorindatagridwebcontrol.asp

This site has lots of How To examples for the datagrid: http://authors.aspalliance.com/aspxtreme/webforms/controls/datagrid.aspx


Hope that helps,

Michelle

***Disclaimer: This posting is provided "as is" with no warranties and confers no rights.***
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top