Change datatype of new column. Following code will create new column total with int32 datatype and will automatically cast values of subtotal column.


dt.Columns.Add("total", System.Type.GetType("System.String"),"Convert(Subtotal, 'System.Int32')" );

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/xcPgp4sh29Y/14585