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. Simple Databinding to Datarow - values not updating???

Simple Databinding to Datarow - values not updating???

Scheduled Pinned Locked Moved C#
questionannouncement
1 Posts 1 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.
  • T Offline
    T Offline
    TheTinSoldier
    wrote on last edited by
    #1

    Hi, I have a loop that is populating label controls from a Datatable. If I simple bind the datarow to the labels' Text property, when I update the Datatable I expected the changes to be reflected in the label. This is true if I bind the the table directly. // this shows the correct values but they don't update when I update the data in the table ... templabel.DataBindings.Add("Text", **dt.Rows[i]**, "state"); ... // when I bind directly to the table, updating the table does reflect the changes. But this option is no good as all my label controls have the same values. ... templabel.DataBindings.Add("Text", **dt**, "state"); ... Thanks!

    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