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. Edit Function in datagrid

Edit Function in datagrid

Scheduled Pinned Locked Moved ASP.NET
question
4 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.
  • D Offline
    D Offline
    DotNet
    wrote on last edited by
    #1

    I wish to do, click on the Edit hyperlink in the datagrid, and it brings me to another page, where I can do the edit in a new page. Please advice? Thanks.

    S 1 Reply Last reply
    0
    • D DotNet

      I wish to do, click on the Edit hyperlink in the datagrid, and it brings me to another page, where I can do the edit in a new page. Please advice? Thanks.

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

      If you set the datagrid AuroGenerateColumns to false and add a HyperlinkColumn, the syntax is something like Then in the edit page have a form that is populated with the data extracted using the id passed on the querystring. If I had a better memory I would remember more.

      D 1 Reply Last reply
      0
      • S suzyb

        If you set the datagrid AuroGenerateColumns to false and add a HyperlinkColumn, the syntax is something like Then in the edit page have a form that is populated with the data extracted using the id passed on the querystring. If I had a better memory I would remember more.

        D Offline
        D Offline
        DotNet
        wrote on last edited by
        #3

        Hie..... I'm still stuck with the Sub Page_Load of the detailpage.aspx. I don't know how to code it. I'm using Ms Access as my database. Can you please help me. Thank you.

        S 1 Reply Last reply
        0
        • D DotNet

          Hie..... I'm still stuck with the Sub Page_Load of the detailpage.aspx. I don't know how to code it. I'm using Ms Access as my database. Can you please help me. Thank you.

          S Offline
          S Offline
          suzyb
          wrote on last edited by
          #4

          In Page_Load you need to get the ID from the querystring (you may also need to convert it to whatever type the id is in your db as the querystring value is a string) then use it to extract only the record with that id from your database. You can then set your edit controls to the values from the database record like, if you have a dataset with the results.. txtName.Text = dataSet.Tables[0]Rows[0]["Name"] If I had a better memory I would remember more.

          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