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 RowUpdating textbox.Text = ""

GridView RowUpdating textbox.Text = ""

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

    Hi, I have written an user control with a gridview control, that does select, edit, update, cancel functionality. I have a question regarding the RowUpdating event. I bind my grid at runtime to a generic list<>, therefor I can't use the oldvalues, newvalues or the keys as you need a datasource control with an update command to be able to use these dictionaries. Another thing is that I have the autogeneratefields = true (as I am creating a generic gridview) and therefor I cannot use the gridview.columns[].extractvaluesfromcell as the columns count = columns created at design time to add the select, edit, update, cancel buttons. I have used the following code: ((TextBox)gridview.Rows[e.RowIndex].Cells[5].Controls[0]).Text which results in "". However the old values are still available. The newly typed data not available. Any help will be greatly appreciated. Thanx

    H 1 Reply Last reply
    0
    • M Member 4382232

      Hi, I have written an user control with a gridview control, that does select, edit, update, cancel functionality. I have a question regarding the RowUpdating event. I bind my grid at runtime to a generic list<>, therefor I can't use the oldvalues, newvalues or the keys as you need a datasource control with an update command to be able to use these dictionaries. Another thing is that I have the autogeneratefields = true (as I am creating a generic gridview) and therefor I cannot use the gridview.columns[].extractvaluesfromcell as the columns count = columns created at design time to add the select, edit, update, cancel buttons. I have used the following code: ((TextBox)gridview.Rows[e.RowIndex].Cells[5].Controls[0]).Text which results in "". However the old values are still available. The newly typed data not available. Any help will be greatly appreciated. Thanx

      H Offline
      H Offline
      Herman T Instance
      wrote on last edited by
      #2

      Have you checked the array of Controls? I my websites it its always Controls[1]

      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