[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to handle the page view in GridView (ASP.NET 2.0) control?

Posted on 2006-06-05
3
Medium Priority
?
295 Views
Last Modified: 2008-02-01
How to handle the page view in GridView (ASP.NET 2.0) control?

how do you use the grdTemplateTrack_PageIndexChanging and grdTemplateTrack_SelectedIndexChanged?

0
Comment
Question by:chuang4630
  • 2
3 Comments
 
LVL 5

Expert Comment

by:Jojo1771
ID: 16839521
What are you wanting to do? Grid view has built in pageing (no code needed, unlike the datagrid). Simpy set Allowpaging.

FYI.

Anything ending in "ing" is usually pre event.
And ending in "ed" is post even.

So pre paging and post paging. These events always fire on  a page change.  So you could do custom if you wanted.

You can also set the page manually.

Gridview-> page index =1 or what ever.
0
 
LVL 1

Author Comment

by:chuang4630
ID: 16841306
I ran the test with 20 rows of data. There is no  problem to display the first 10 rows. However, when I click the page 2, the page does not change. So I am wondering what may go wrong.

The code to display the data is in If (!IsPostback) clause. No ode outside this clause.

Also, I am windering whether the page change happens n the server or client side?
0
 
LVL 5

Accepted Solution

by:
Jojo1771 earned 2000 total points
ID: 16891289
Sorry, on late respond.
 Its sever side.
 So if you got 50,000  rows at 10 a page. The client only gets 10, which is good since sending 50, 000 rows would really hurt performance.

Check out this site for gridview help.
http://www.gridviewguy.com/ArticleDetails.aspx?articleID=142

Im not a 100% sure but I think you need to rebind on every page request. So move databind out og your if not postback and see if that helps.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month17 days, 23 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question