I have approximate 50000 row gridview.and i set the pagesize 20 grid view.so how we can find the last row gridview.If we do next then it takes more time.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If I get your question right, you want to shift to last page from first page.
What you can do is when you are binding the
gridviewsave number of rows in your data source inviewstate:Then use a seperate link for navigating to last page
which fires pageindexchanging event. On that event you can calculate
Viewstate["rowCount"]/pagesizewhich will give you total pages.Now assign
gridview.pageIndex=aboveresult