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. binding textbox to datagridview

binding textbox to datagridview

Scheduled Pinned Locked Moved C#
wpfwcftutorial
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.
  • G Offline
    G Offline
    ginji20
    wrote on last edited by
    #1

    hi... could someone tell me the codes for this scenario.. if i click on the datagridview for example username if i click that username that username will appear in a label or textbox... thanks... ginji

    modified on Friday, June 20, 2008 3:12 AM

    P 1 Reply Last reply
    0
    • G ginji20

      hi... could someone tell me the codes for this scenario.. if i click on the datagridview for example username if i click that username that username will appear in a label or textbox... thanks... ginji

      modified on Friday, June 20, 2008 3:12 AM

      P Offline
      P Offline
      paas
      wrote on last edited by
      #2

      In the grid's CellClick event you could have code something like... String sColName = GridView.Columns[e.ColumnIndex].Name; if (sColName == "username") TextUser.Text = GridView.CurrentRow.Cells["username"].Value.ToString();

      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