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. Bind textbox to tatatable, please help

Bind textbox to tatatable, please help

Scheduled Pinned Locked Moved C#
helpannouncement
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.
  • A Offline
    A Offline
    akkram
    wrote on last edited by
    #1

    Hi I have an untyped dataset with one datatable in it. The datatable is bound to a datagridview. I also have some textboxes that I want to bind to the datatable. Hello. When a user enters some values on a row in the datagridview I want these values to show in the corresponding textboxes. It should also be possible to type directly into the textboxes which should then update the corresponding row in the datatable/datagridview. Datagridview ------------ ID Name Age Datatable ------------ ID Name Age textboxID textboxName textboxAge I have tried getting this to work for a while but without luck, any help would really be appreciated

    K 1 Reply Last reply
    0
    • A akkram

      Hi I have an untyped dataset with one datatable in it. The datatable is bound to a datagridview. I also have some textboxes that I want to bind to the datatable. Hello. When a user enters some values on a row in the datagridview I want these values to show in the corresponding textboxes. It should also be possible to type directly into the textboxes which should then update the corresponding row in the datatable/datagridview. Datagridview ------------ ID Name Age Datatable ------------ ID Name Age textboxID textboxName textboxAge I have tried getting this to work for a while but without luck, any help would really be appreciated

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

      You can attach each field of the datatable with nameofdataset.Tables[0].Rows[i].ItemArray[j] with the indexes i an j changing for the Rows and cells you want to change or read out

      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