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. How to Update the Records in GridView Control Through Coding in asp.net2.0

How to Update the Records in GridView Control Through Coding in asp.net2.0

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettutorialannouncement
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.
  • M Offline
    M Offline
    mrgaddam
    wrote on last edited by
    #1

    Hi, This is from Chandrakanth. I am using GridView Control. And I would like to update the records through Coding. Can any one tell me how to go for that. Thansk in Advance With Regards Chandrakanth Chandrakanth

    Chandrakanth

    O M 3 Replies Last reply
    0
    • M mrgaddam

      Hi, This is from Chandrakanth. I am using GridView Control. And I would like to update the records through Coding. Can any one tell me how to go for that. Thansk in Advance With Regards Chandrakanth Chandrakanth

      Chandrakanth

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

      u mean u want to update records in databases through gridview??

      software student

      1 Reply Last reply
      0
      • M mrgaddam

        Hi, This is from Chandrakanth. I am using GridView Control. And I would like to update the records through Coding. Can any one tell me how to go for that. Thansk in Advance With Regards Chandrakanth Chandrakanth

        Chandrakanth

        O Offline
        O Offline
        ooooooooppppppss
        wrote on last edited by
        #3

        i didnt understand ur query..however this code may help u updating records in databases if changes are made in datagrid this code will b behind update button for (int i = 0; i <= editgrid.RowCount - 1; i++) { str = "UPDATE table SET column1 = '" + editgrid.Rows[i].Cells[1].Value + "', column2='" + editgrid.Rows[i].Cells[2].Value + " WHERE cid = " + editgrid.Rows[i].Cells[0].Value; SqlCommand com = new SqlCommand(str, conn); com.ExecuteNonQuery(); }

        software student

        1 Reply Last reply
        0
        • M mrgaddam

          Hi, This is from Chandrakanth. I am using GridView Control. And I would like to update the records through Coding. Can any one tell me how to go for that. Thansk in Advance With Regards Chandrakanth Chandrakanth

          Chandrakanth

          M Offline
          M Offline
          mrgaddam
          wrote on last edited by
          #4

          Hi, Once again This is from Chandrakanth. Actually i am using GridView Control in ASP.NET2.0 I want to update the records in databases through GridView Control by using Coding in the CSharp. not through Properties. Thanks for Reaponse. Thanks& Regards Chandrakanth

          Chandrakanth

          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