I'm developing an application in Visual Studio 2008 to parse and coalesce multiple laboratory results from *.csv into one single DataTable. Resultant tables tend to contain 1000+ records over >30 columns. The user is intended to first view the data in a DataGrid and then manipulate select columns accordingly using a set of functions (generally removing erroneous characters such as "<", ">"). The data is then refreshed to the DataGrid.
My current method of is slow and inefficient, taking ~45 seconds per column, per 1000 records. Is there a better way to manipulate data within datatables? I realise manipulating the underlying data prior to visualisation would be better, however the user must see the data first to choose effective treatments.
Any help would be appreciated.
Function ConvertNo(ByVal Factor As Decimal, ByVal colNam As String, ByVal chrX As String)
Dim inVal = Nothing
For Each dRow As DataRow In tab_Data.Rows
inVal = dRow(colNam)
If Not IsDBNull(inVal) Then
inVal = Val(Regex.Replace(inVal, chrX, "")) * Factor
dRow(colNam) = inVal