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. General Programming
  3. .NET (Core and Framework)
  4. how to bind records into gridview using data reader

how to bind records into gridview using data reader

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharphelptutorial
4 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
    mohideen84
    wrote on last edited by
    #1

    i am the beginer for .net, i need to bind records into gridview using data reader, please help me, how to do this..

    M M R 3 Replies Last reply
    0
    • M mohideen84

      i am the beginer for .net, i need to bind records into gridview using data reader, please help me, how to do this..

      M Offline
      M Offline
      mohideen84
      wrote on last edited by
      #2

      this is very easy, first declare data reader and provide obj for data reader and read each and every row using for loop and bind the gridview columns.

      1 Reply Last reply
      0
      • M mohideen84

        i am the beginer for .net, i need to bind records into gridview using data reader, please help me, how to do this..

        M Offline
        M Offline
        Muhammad Mazhar
        wrote on last edited by
        #3

        Quite easy, first declare some list with type of your data wrapper, then read db via reader and populate one warper object with data from reader for each row and add it to declared list. Lastly you need to set gridview data source property to your declared list and call bind on gridview that's it.

        Share your experience with others Check my Blog...

        1 Reply Last reply
        0
        • M mohideen84

          i am the beginer for .net, i need to bind records into gridview using data reader, please help me, how to do this..

          R Offline
          R Offline
          Roll 1
          wrote on last edited by
          #4

          Check out http://www.dotnetspider.com/resources/21557-Code-bind-gridview-with-data-reader.aspx

          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