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. GridView problem

GridView problem

Scheduled Pinned Locked Moved ASP.NET
helpcssannouncement
4 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.
  • U Offline
    U Offline
    User 4510968
    wrote on last edited by
    #1

    Hi friends i have an issue with grid view update functionality The problem is when i edit one of my grid view columns and click update The GridView1_RowUpdating method which contains the string textlastname = ((TextBox)GridView1.Rows[e.RowIndex].FindControl("TextBox1")).Text; returns the old value in the column instead of the newly edited value. I need to get the newly edited value in the textlastname. TextBox1 is the id of the control Any help is highly appricated praveen

    K B 2 Replies Last reply
    0
    • U User 4510968

      Hi friends i have an issue with grid view update functionality The problem is when i edit one of my grid view columns and click update The GridView1_RowUpdating method which contains the string textlastname = ((TextBox)GridView1.Rows[e.RowIndex].FindControl("TextBox1")).Text; returns the old value in the column instead of the newly edited value. I need to get the newly edited value in the textlastname. TextBox1 is the id of the control Any help is highly appricated praveen

      K Offline
      K Offline
      Karan_TN
      wrote on last edited by
      #2

      check the "textlastname" value before update and by default set textlastname=""

      U 1 Reply Last reply
      0
      • U User 4510968

        Hi friends i have an issue with grid view update functionality The problem is when i edit one of my grid view columns and click update The GridView1_RowUpdating method which contains the string textlastname = ((TextBox)GridView1.Rows[e.RowIndex].FindControl("TextBox1")).Text; returns the old value in the column instead of the newly edited value. I need to get the newly edited value in the textlastname. TextBox1 is the id of the control Any help is highly appricated praveen

        B Offline
        B Offline
        Bhim Prakash Singh
        wrote on last edited by
        #3

        hi friend this is wrong method. you want to retrive data from GridView. first you select row. then select column.

        1 Reply Last reply
        0
        • K Karan_TN

          check the "textlastname" value before update and by default set textlastname=""

          U Offline
          U Offline
          User 4510968
          wrote on last edited by
          #4

          thanks for your reply

          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