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. data bound problem

data bound problem

Scheduled Pinned Locked Moved C#
helpquestion
4 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
    gus_br
    wrote on last edited by
    #1

    my problem is the following: I have one datagrid and i want to add one column (named Status) which a text description regarding to a item status. This datagrid in binded to a typed dataset, but in this DS the column status is represented as a number (0 [for waiting], 1 [for ok], and so on). What`s the best approach to map the numeric representation in the DS to a textual representation in the datagrid column? (I don`t wanna loop throught my datagrid and change de Status column value.) Thanks in advance... :]

    W 1 Reply Last reply
    0
    • G gus_br

      my problem is the following: I have one datagrid and i want to add one column (named Status) which a text description regarding to a item status. This datagrid in binded to a typed dataset, but in this DS the column status is represented as a number (0 [for waiting], 1 [for ok], and so on). What`s the best approach to map the numeric representation in the DS to a textual representation in the datagrid column? (I don`t wanna loop throught my datagrid and change de Status column value.) Thanks in advance... :]

      W Offline
      W Offline
      wheelerbarry
      wrote on last edited by
      #2

      i have achieved this by having another table containing the status representations, then binding the status table to the column with the values, and they will automatically set to the status definition.

      G 1 Reply Last reply
      0
      • W wheelerbarry

        i have achieved this by having another table containing the status representations, then binding the status table to the column with the values, and they will automatically set to the status definition.

        G Offline
        G Offline
        gus_br
        wrote on last edited by
        #3

        i haven`t understand. how can i "automatically" do that? but i`m thinking about a event do accomplish that. any ideas?

        W 1 Reply Last reply
        0
        • G gus_br

          i haven`t understand. how can i "automatically" do that? but i`m thinking about a event do accomplish that. any ideas?

          W Offline
          W Offline
          wheelerbarry
          wrote on last edited by
          #4

          in the same way you can bind elements in a combo box with the ValueMember and DisplayMember, you could achieve the same effect with a data column (though you would have to derive one from the existing ones). i have no idea how you would achieve this with an event, and would question if it is even possible. It is is please enlighten me.

          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