Click here to Skip to main content
15,888,031 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi i have a gridview contains hundred of records, it is having paging, every page have size 50. now i want to find the first & last row index numbers of the gridview in each paging event.
Posted

1 solution

I can't help you through the code, because I have not seen the flow of your coding.In spite of that I can give you a little idea.
Take a hidden field on the page and first time set is to 0. Definitely the last index will be +50 of the first index as you are telling that you are having 50 rows as a time to display. Now in page index changing event of gridview increase your hidden field value to 50.

Finally you got the solution here. The hidden field value will contain the first row index of the current page of entire data and when you'll add 50 to it that will be the last row index of the current page of your entire data.


--Amit
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900