DataColumn col_type = new DataColumn("Type");
myTable.Columns.Add(col_type);
col_type.Expression = "IIF(Col1='Mr', 'Mister', 'Miss');
http://msdn.microsoft.com/library/de...ssiontopic.asp
"VMI" <(E-Mail Removed)> wrote in message
news:uR$(E-Mail Removed)...
>I have a a filled datatable with 3 datacolumns and I need to add a 4th
>datacolumn that will contain information according to one of the columns.
>For example, for one record, Col1, Col2, Col3 will contain "Mr", "John",
>"Smith", respectively. The newly-added 4th column (Col4) will evaluate
>Col1, and if it says "Mr.", that row wlll contain "Mister" in Col4. If it
>says, "Ms", it'll contain, "Miss", and so on.
> How can I do this?
>
> Thanks.
>