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. updating from from gridview is soooo confusing

updating from from gridview is soooo confusing

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

    i want to update data from gridview i tried to do but always getting strange errors .... i m using update [tab] set [name field] = [@parameter1] where [id field] = [@parameter2] in my sqldatasource but dont know where to provide these parameters value specially when the controls is inside gridview which cant be accessed that easily.... can any1 explain this ?? thankx. i can do this manually by defining template edit, update, cancel field when on clicking update execute my manual update code. i m asking for non-manual way to do it.

    S 1 Reply Last reply
    0
    • D dream_liner_7e7

      i want to update data from gridview i tried to do but always getting strange errors .... i m using update [tab] set [name field] = [@parameter1] where [id field] = [@parameter2] in my sqldatasource but dont know where to provide these parameters value specially when the controls is inside gridview which cant be accessed that easily.... can any1 explain this ?? thankx. i can do this manually by defining template edit, update, cancel field when on clicking update execute my manual update code. i m asking for non-manual way to do it.

      S Offline
      S Offline
      Subin Alex
      wrote on last edited by
      #2

      for updating the data fields in a grid view , u may hav to do a little changes in the properties of the Grid view. first, u select the data source of the Grid and after putting the update query with the parameters , Go to the Grid view properties and select the "DatakeyNames" prop. and then frm that select ur "id field" for it. After that u select the smart tag of Grid view : check the "Enable Editing" and then go for "Edit Colums". From that , first uncheck "Auto-gen. fields" check box then add from "Command fields" the Edit,update etc. then add all the "Bound fields "(if u can't find it just refresh schema). Then finally, select the added bounded fields and put the fields to edit and make its "readonly" prop. as false and others must b true.

      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