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. Adding data into GridView

Adding data into GridView

Scheduled Pinned Locked Moved ASP.NET
cssdatabasedesignquestion
6 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
    haroon1980
    wrote on last edited by
    #1

    I grabbed the gridview control onto design page and then binded it with the database. Now I want to enter data in the grid view when i run the website but i cannot find the way to do that. How can this be done? Any guidance please or show me the code or way to do that. Thanks :confused:

    O 1 Reply Last reply
    0
    • H haroon1980

      I grabbed the gridview control onto design page and then binded it with the database. Now I want to enter data in the grid view when i run the website but i cannot find the way to do that. How can this be done? Any guidance please or show me the code or way to do that. Thanks :confused:

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

      Be more clear, you mean, that your gridview read well the data from the database, but you can't add new records? did you bind the gridwiew to a sqlDataSource?

      H 1 Reply Last reply
      0
      • O orsini

        Be more clear, you mean, that your gridview read well the data from the database, but you can't add new records? did you bind the gridwiew to a sqlDataSource?

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

        yes i can see the data which has been added from SQL Server DB but how I can add manually? Yes I binded gridview to SQL Data Source.

        O 1 Reply Last reply
        0
        • H haroon1980

          yes i can see the data which has been added from SQL Server DB but how I can add manually? Yes I binded gridview to SQL Data Source.

          O Offline
          O Offline
          orsini
          wrote on last edited by
          #4

          ok, when you bind the sqlDatasource. if you want enable edit and adding, you have to make when you are configuring the sqldatasource, in the box you select the columns you want to show from the database, there are three botton, Where, orden by and Advanced click the last one, Advanced, and check the first box "generate inset up........ and bind again your grid view to the sqldatasource. and play with the grid view setting to make enable edit and adding. hope that will help

          H 1 Reply Last reply
          0
          • O orsini

            ok, when you bind the sqlDatasource. if you want enable edit and adding, you have to make when you are configuring the sqldatasource, in the box you select the columns you want to show from the database, there are three botton, Where, orden by and Advanced click the last one, Advanced, and check the first box "generate inset up........ and bind again your grid view to the sqldatasource. and play with the grid view setting to make enable edit and adding. hope that will help

            H Offline
            H Offline
            haroon1980
            wrote on last edited by
            #5

            I can see edit option but no ADD option. How can this be done?

            O 1 Reply Last reply
            0
            • H haroon1980

              I can see edit option but no ADD option. How can this be done?

              O Offline
              O Offline
              orsini
              wrote on last edited by
              #6

              check out this videos, they will help you a lot to do what you want to do, the are in asp.net official website [http://www.asp.net/learn/videos/default.aspx?tabid=63#ajax](<a href=)[^]" rel="nofollow">http://www.asp.net/learn/videos/default.aspx?tabid=63#ajax[^][[http://www.asp.net/learn/videos/default.aspx?tabid=63#ajax](<a href= "New Window")[^]">^]

              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