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. General Programming
  3. C#
  4. Cant see TextBox1 in codeView [modified]

Cant see TextBox1 in codeView [modified]

Scheduled Pinned Locked Moved C#
csshelp
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.
  • I Offline
    I Offline
    It_tech
    wrote on last edited by
    #1

    Hi all, I have the following gridview which has got a text box for any record entry of data on the grid. when i want to write some code for the TextBox, I cant see it on the code View.Is there any way i can access Textbox1 on the code associate it with the record on the grid. Thanks in advance for your help. -- Modified Sunday, February 21, 2010 2:16 PM

    P 1 Reply Last reply
    0
    • I It_tech

      Hi all, I have the following gridview which has got a text box for any record entry of data on the grid. when i want to write some code for the TextBox, I cant see it on the code View.Is there any way i can access Textbox1 on the code associate it with the record on the grid. Thanks in advance for your help. -- Modified Sunday, February 21, 2010 2:16 PM

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      When you bind to multiple rows, what would you expect to see with a single ID for the textbox? You can't have multiple items called the same thing so you need to get at it some other way; and that way (unfortunately) is to use the Cells collection of the row you're interested in. This property provides you with indexer access to each cell, so you'll have to refer to something like Cells[0] to get the first textbox (bearing in mind you'll need to cast it to the appropriate type).

      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

      As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

      My blog | My articles | MoXAML PowerToys | Onyx

      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