Solved

How to know the pageindex of the last page of a gridview

Posted on 2006-06-10
2
393 Views
Last Modified: 2008-02-01
Thanks. It looks simple.
0
Comment
Question by:maidinhtai
2 Comments
 
LVL 10

Accepted Solution

by:
SystemExpert earned 250 total points
ID: 16877572
Hi,

You may have page size

and number of record

so

 Page size / number of record  = you will get how many paging page you have

and last pageindex =  -number of record - (pagesize * number of page )

thanks

0
 
LVL 3

Author Comment

by:maidinhtai
ID: 16877779
Simply it's gridview1.PageCount-1. And I found the problem is at the Page_Load event and Page_SaveStateComplete event. gridview1.PageCount always returns 0 in Page_Load event and it returns a number >= 0 in Page_SaveStateComplete event. That's why I always get a error.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall‚Ķ
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po‚Ķ
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now