Gridview pagination problem

Posted by Shoyebaziz123 under ASP.NET on 2/28/2013 | Points: 10 | Views : 1097 | Status : [Member] | Replies : 1
Hello All,

I am facing a problem with gridview ,
that there is more than 800 rows in database , i am retriewving all these record and bind to gridview setting allow paging true and page size 20 ,
it bind and show properly i.e pageing from 1 2 3 4 5 .......

on page index changing i have writ the code
grd.pageindex=e.new pageindex and setting datasource and databind method ... all of wrking fine

but my problem is that as there is currently 800 rows in future it may exxedd , while page load it takes several mint to bind gridview , also if i click page index it takes several time ....

my boss told that i have to get firstly 15 record then i choosing 2 page index i have to retriew next 15 record ... is it possible ... if yes how i can do this ?

thanks




Responses

Posted by: Vuyiswamb on: 2/28/2013 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
That is exactly what paging is doing in asp.net. So what you should know that Paging will always work no matter how many records you have , but if you feel that your system performance might degrade , you need to start adding filters when searching the data , instead of binding the whole dataset that might never all be used.


Thank you for posting at Dotnetfunda
[Administrator]

Shoyebaziz123, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response