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. DataGrid in ASP.NET

DataGrid in ASP.NET

Scheduled Pinned Locked Moved Web Development
csharpasp-netdatabasequestion
5 Posts 3 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.
  • M Offline
    M Offline
    Mazdak
    wrote on last edited by
    #1

    I have a DataGrid in the web form,in Page_Load I bind it to a datasource.This database is very larg so I make the PageStyle availabe,when I run my form, the first five rows appeare but if I click the next in pagerstyle nothing happend and it doesn't show next records.Should I add any code for this feature? Thanks Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
    Wish You Were Here-Pink Floyd-1975

    O P 2 Replies Last reply
    0
    • M Mazdak

      I have a DataGrid in the web form,in Page_Load I bind it to a datasource.This database is very larg so I make the PageStyle availabe,when I run my form, the first five rows appeare but if I click the next in pagerstyle nothing happend and it doesn't show next records.Should I add any code for this feature? Thanks Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
      Wish You Were Here-Pink Floyd-1975

      O Offline
      O Offline
      omkamal
      wrote on last edited by
      #2

      Yes, you have to handle the OnPageIndexChanged Event and bind the data again with setting the CurrentPageIndex property to the selected page index. See, OnPageIndexChanged Event help in MSDN documentation. They have a sample also. omkamal

      M 1 Reply Last reply
      0
      • O omkamal

        Yes, you have to handle the OnPageIndexChanged Event and bind the data again with setting the CurrentPageIndex property to the selected page index. See, OnPageIndexChanged Event help in MSDN documentation. They have a sample also. omkamal

        M Offline
        M Offline
        Mazdak
        wrote on last edited by
        #3

        Thanks Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
        Wish You Were Here-Pink Floyd-1975

        1 Reply Last reply
        0
        • M Mazdak

          I have a DataGrid in the web form,in Page_Load I bind it to a datasource.This database is very larg so I make the PageStyle availabe,when I run my form, the first five rows appeare but if I click the next in pagerstyle nothing happend and it doesn't show next records.Should I add any code for this feature? Thanks Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
          Wish You Were Here-Pink Floyd-1975

          P Offline
          P Offline
          Paul Watson
          wrote on last edited by
          #4

          Mazdak wrote: Should I add any code for this feature? Yes you have to add your own code (as the other guy said). But on that note I was highly disapointed when I tried the DataGrid for the first time and figured out that all it did re: the Paging was put in the link really. What a cheek. It can't take MS more than a few minutes to add in the extra code. Anyway. I was wondering if it was possible to inherit the DataGrid and make my own ASP.NET Webform Control which had the Paging code built in? I would think it is possible but before I start banging my head away at it I would like some confirmation. regards, Paul Watson Bluegrass Cape Town, South Africa "The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge Sonork ID: 100.9903 Stormfront

          M 1 Reply Last reply
          0
          • P Paul Watson

            Mazdak wrote: Should I add any code for this feature? Yes you have to add your own code (as the other guy said). But on that note I was highly disapointed when I tried the DataGrid for the first time and figured out that all it did re: the Paging was put in the link really. What a cheek. It can't take MS more than a few minutes to add in the extra code. Anyway. I was wondering if it was possible to inherit the DataGrid and make my own ASP.NET Webform Control which had the Paging code built in? I would think it is possible but before I start banging my head away at it I would like some confirmation. regards, Paul Watson Bluegrass Cape Town, South Africa "The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge Sonork ID: 100.9903 Stormfront

            M Offline
            M Offline
            Mazdak
            wrote on last edited by
            #5

            Paul Watson wrote: I would think it is possible but before I start banging my head away at it I would like some confirmation. This is my confirmation :);) Mazy "So,so you think you can tell, Heaven from Hell, Blue skies from pain,... How I wish,how I wish you were here."
            Wish You Were Here-Pink Floyd-1975

            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