(Using Visual Studio 2005 / .NET 2.0)
I have a DataSet which is being prepopulated from another module using SQL. All the values in it are fine and will stay the same as they are.
But once I retrieve the DataSet (and assign it to a DataTable since it is a one-table set) I need to add an additional column onto the end of the DataTable and populate it based on values in each row.
As a simplified example, let's say for example:
Column 1's values need to be checked. If they are equal to "A", the new column should be set to "G". "B", likewise "H", and "C" likewise "I".
What I need to do is cycle through the table, checking the value of each row and populate the new column for that row accordingly.
I am having trouble finding the way to do this (most specifically, to set the value of the DataColumn identifying it by name or some other identifier - array would be ok) and could use some code snippets or guidance.
It seems fairly straightforward but I can't find the information about how to do it anywhere I've looked. Thanks in advance...