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 data from a gridview in code

Updating data from a gridview in code

Scheduled Pinned Locked Moved ASP.NET
helpdatabasequestionannouncement
1 Posts 1 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.
  • B Offline
    B Offline
    bayo
    wrote on last edited by
    #1

    Hi, I have this problem with a gridview from which I am tryng to update a database table. I have this handler for my Row_Updating event: Dim index As Integer = gvRecruit.EditIndex Dim row As GridViewRow = gvRecruit.Rows(index) Dim Id as Integer = Integer.Parse(row.Cells(0).Text) Dim fName As TextBox = CType(row.FindControl("txtFirstName"), TextBox) Dim firstName As String = fName.Text Dim lName As TextBox = CType(row.Cells(1).Controls(1), TextBox) Dim lastName As String = lName.Text etc... Problem is, when I step thru the code, the fName and lName still hold the old values, even though I have updated them with new ones. I think I am missing something. Can anybody help? PS I don't really do VB, but I don't think that is an issue here.

    acodeisacodeisacode

    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