data bound problem
-
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... :]
-
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... :]
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.
-
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.
-
i haven`t understand. how can i "automatically" do that? but i`m thinking about a event do accomplish that. any ideas?
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.