gridview custom paging
-
Hi, i want to implement an efficient gridview...i have about 1500 rows and it takes time to load into a gridview (with automatic paging), so i want to implement a custom paging scheme in which i show only 100 rows at a time... i have turned on paging, pulled out count for the rows, also pulled out 100 rows but Q1. how do i make gridview generate 15pages link (100 per page,15 pages)... Q2.how would i call the second page with 100 -200 rows.... Please help, ...with question1 especially... also i am binding the gridview at runtime to different tables...i think i am using about 4 different types of tables... so i can't use datasources etc... please help
haseeb
-
Hi, i want to implement an efficient gridview...i have about 1500 rows and it takes time to load into a gridview (with automatic paging), so i want to implement a custom paging scheme in which i show only 100 rows at a time... i have turned on paging, pulled out count for the rows, also pulled out 100 rows but Q1. how do i make gridview generate 15pages link (100 per page,15 pages)... Q2.how would i call the second page with 100 -200 rows.... Please help, ...with question1 especially... also i am binding the gridview at runtime to different tables...i think i am using about 4 different types of tables... so i can't use datasources etc... please help
haseeb
-
Hi, for the Q1: Set your Grid property allowpaging=true and pagesize=100 for the Q2: in your Grid_pageindexchaging: Grid1.pageindex=e.newpageindex Grid1.Datasource=dt (your datatable) Grid1.Databind() Hope this one can help. Thanks
hi... thanx for ur response... i have already done this and the problem with this is that it isn't efficient... in such example the grid only shows 100 rows but datasource has all data in it... wat i am trying to do is to get count of the no. of rows , somehow make grid generate appropriate page numbers and then pull out only 100 rows at a time... then on pageindexchanging, take get the page index, select another 100 rows this time rows from 100-200... I think,i have explained my problem... if not, lemme know and i will try my best to retype something that makes sense.. thanx... regards
haseeb