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. Paging in Gridview

Paging in Gridview

Scheduled Pinned Locked Moved ASP.NET
wpfwcfhelpquestion
6 Posts 4 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.
  • B Offline
    B Offline
    BINOVAR
    wrote on last edited by
    #1

    Iam Binding a gridview through code without using Datasource.I have enabled Paging.But I get the below error when I click the paging below.Is there any other properties I have to set ? The GridView 'GridView1' fired event PageIndexChanging which wasn't handled. Thanks In advance..

    S S E 3 Replies Last reply
    0
    • B BINOVAR

      Iam Binding a gridview through code without using Datasource.I have enabled Paging.But I get the below error when I click the paging below.Is there any other properties I have to set ? The GridView 'GridView1' fired event PageIndexChanging which wasn't handled. Thanks In advance..

      S Offline
      S Offline
      Sonia Gupta
      wrote on last edited by
      #2

      This problem occurs when u have enabled the paging and have not written the code in page index change function.and even then trying to click the page no which got generated in ur gridview.

      1 Reply Last reply
      0
      • B BINOVAR

        Iam Binding a gridview through code without using Datasource.I have enabled Paging.But I get the below error when I click the paging below.Is there any other properties I have to set ? The GridView 'GridView1' fired event PageIndexChanging which wasn't handled. Thanks In advance..

        E Offline
        E Offline
        Elizma
        wrote on last edited by
        #3

        If you are populating you gridview in code you have to write code in you PageIndexChanging event to repopulate the gridview. You start with the following line of code: GridView1.PageIndex = e.NewPageIndex; This is to get the Page you selected, but now you have to repopulate the gridview control. Hope this helps.

        1 Reply Last reply
        0
        • B BINOVAR

          Iam Binding a gridview through code without using Datasource.I have enabled Paging.But I get the below error when I click the paging below.Is there any other properties I have to set ? The GridView 'GridView1' fired event PageIndexChanging which wasn't handled. Thanks In advance..

          S Offline
          S Offline
          Sathesh Sakthivel
          wrote on last edited by
          #4

          BINO VARGHESE wrote:

          The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.

          As a result of not setting the DataSourceID property of the GridView to a DataSourceControl DataSource, you have to add event handlers for sorting and paging. For more Details Get it[^]

          Regards, Satips.:rose:

          B 2 Replies Last reply
          0
          • S Sathesh Sakthivel

            BINO VARGHESE wrote:

            The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.

            As a result of not setting the DataSourceID property of the GridView to a DataSourceControl DataSource, you have to add event handlers for sorting and paging. For more Details Get it[^]

            Regards, Satips.:rose:

            B Offline
            B Offline
            BINOVAR
            wrote on last edited by
            #5

            Thank you all for your replies. I have added GridView1.PageIndex = e.NewPageIndex in Pageindexing event of the gridview ..now no errors but the gridview is not populating any values.I believe I have to add some code to show exactly that particular page.Can any one pls give a Jist Idea about it. Thanks in advance

            1 Reply Last reply
            0
            • S Sathesh Sakthivel

              BINO VARGHESE wrote:

              The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.

              As a result of not setting the DataSourceID property of the GridView to a DataSourceControl DataSource, you have to add event handlers for sorting and paging. For more Details Get it[^]

              Regards, Satips.:rose:

              B Offline
              B Offline
              BINOVAR
              wrote on last edited by
              #6

              I got the output i required ..Thanks.

              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