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. .NET, a datagrid & a roundhouse trip to a databse I could do without

.NET, a datagrid & a roundhouse trip to a databse I could do without

Scheduled Pinned Locked Moved ASP.NET
csharpdatabasetoolshelp
2 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.
  • G Offline
    G Offline
    gamerPotatoe
    wrote on last edited by
    #1

    Hi guys, I have an editable datagrid which loads values from a sqlserver database and also allows to edit & delete the respective elements when needed. I have currently also included a seperate add utility in the form of textboxes and an add button which enters all textbox values into the databse and binds the datagrid showing the newly entered row. The thing is this all doing very well BUT the problem is that these additions and updations all require a round trip to the database updating and deleting entries directly from the databse. I want that the datagrid allows editing and edition of values in the datagrid but doesn't upodate the database until I say so, like I could put a 'save all' button that updates the changed values in the datagrid to the database in ONE go. Any solutions , source code snippets would be greatly appreciated:D

    S 1 Reply Last reply
    0
    • G gamerPotatoe

      Hi guys, I have an editable datagrid which loads values from a sqlserver database and also allows to edit & delete the respective elements when needed. I have currently also included a seperate add utility in the form of textboxes and an add button which enters all textbox values into the databse and binds the datagrid showing the newly entered row. The thing is this all doing very well BUT the problem is that these additions and updations all require a round trip to the database updating and deleting entries directly from the databse. I want that the datagrid allows editing and edition of values in the datagrid but doesn't upodate the database until I say so, like I could put a 'save all' button that updates the changed values in the datagrid to the database in ONE go. Any solutions , source code snippets would be greatly appreciated:D

      S Offline
      S Offline
      Sebastien Lachance
      wrote on last edited by
      #2

      I don't think it is possible with the current datagrid control. It requires a roundtrip (when updating) to set the ItemIndex property to a row and render itself. The only way I see this working is to create a html table with javascript and stuff. But it will not be an easy way. I may be wrong ;P sebastien.lachance.blogspot.com

      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