Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. gridview custom paging

gridview custom paging

Scheduled Pinned Locked Moved ASP.NET
wpfwcfhelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    haseeb_saeed
    wrote on last edited by
    #1

    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

    S 1 Reply Last reply
    0
    • H haseeb_saeed

      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

      S Offline
      S Offline
      SayreCC
      wrote on last edited by
      #2

      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

      H 1 Reply Last reply
      0
      • S SayreCC

        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

        H Offline
        H Offline
        haseeb_saeed
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups