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. Update in GridView

Update in GridView

Scheduled Pinned Locked Moved ASP.NET
csharpcssasp-nettutorialquestion
3 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
    MeterMan
    wrote on last edited by
    #1

    I placed the following code in the asp.net tags for update command when i hit the edit button on the grid. What is happening is I take and hit edit and update the field then hit update. all my fields go completely blank. Its like the paramater is null and when the update executes it sets everythign to that value which is null but I don't know how to correct cause i thought my code was right. Win32newb "Programming is like Sex, make a mistake and you end up providing support for a long time"

    P M 2 Replies Last reply
    0
    • M MeterMan

      I placed the following code in the asp.net tags for update command when i hit the edit button on the grid. What is happening is I take and hit edit and update the field then hit update. all my fields go completely blank. Its like the paramater is null and when the update executes it sets everythign to that value which is null but I don't know how to correct cause i thought my code was right. Win32newb "Programming is like Sex, make a mistake and you end up providing support for a long time"

      P Offline
      P Offline
      pmpdesign
      wrote on last edited by
      #2

      Could be because you are not using the original ROWID parameter. Try changing @OriginalrowID to @ROWID. I'm just learning .net and have had similar problems.

      1 Reply Last reply
      0
      • M MeterMan

        I placed the following code in the asp.net tags for update command when i hit the edit button on the grid. What is happening is I take and hit edit and update the field then hit update. all my fields go completely blank. Its like the paramater is null and when the update executes it sets everythign to that value which is null but I don't know how to correct cause i thought my code was right. Win32newb "Programming is like Sex, make a mistake and you end up providing support for a long time"

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

        Hi there, What does your GridView control look like? You can create an event handler for the Updating event of the DataSource control, in the handler you can check the InputParameters collection of the event data object to see the parameter values. Also, you can see more information from the link: Using Parameters with Data Source Controls [^]

        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