Ok guys,
I got it...phew,
highlighted is the line of code that i was missing.
i added the column before filling the dataset with data but just after i cloned the structure i need.
<pre lang="vb">Dim dataSetResults As DataSet
Dim foundRowsCancelling() As Data.DataRow
Dim foundRowsCancelled() As Data.DataRow
dataSetResults = ExecStoredProcThatReturnsDataSet("Stored_Proc")
dsCancellingData = dataSetResults.Clone()
dsCancellingData.Tables(0).Columns.Add("ViewCancellingLink", GetType(String))
foundRowsCancelling = dataSetResults.Tables(0).Select("SystemStatus <> 'F'")
Dim cancellingTable As DataTable = dsCancellingData.Tables(0)
For Each cancellingRow As Data.DataRow In foundRowsCancelling
If cancellingRow.Table.Columns.Contains("RefNum") Then
If String.IsNullOrEmpty(cancellingRow("RefNum").ToString) Then
cancellingRow("RefNum") = "None"
Else
cancellingRow("RefNum") = "<a target='_blank' href='http://www.google.com'>View</a>"
End If
Else
cancellingRow.Table.Columns.Add("RefNum", GetType(String))
cancellingRow("RefNum") = "None"
End If
If Not cancellingRow.Table.Columns.Contains("ViewLink") Then
cancellingRow.Table.Columns.Add("ViewLink", GetType(String))
End If
If Not String.IsNullOrEmpty(cancellingRow("SystemID").ToString) Then
cancellingRow("ViewLink") = "test1"
Else
cancellingRow("ViewLink") = "test2"
End If
cancellingTable.ImportRow(cancellingRow)
Next
dsCancellingData.DataSetName = "CancellingDataSet"
dsCancellingData.Tables(0).TableName = "CancellingTable"
dsCancelledData = dataSetResults.Clone()
dsCancelledData.Tables(0).Columns.Add("ViewCancelledLink", GetType(String))
foundRowsCancelled = dataSetResults.Tables(0).Select("SystemStatus = 'Z'")
Dim cancelledTable As DataTable = dsCancelledData.Tables(0)
For Each cancelledRow As Data.DataRow In foundRowsCancelled
If cancelledRow.Table.Columns.Contains("RefNum") Then
If String.IsNullOrEmpty(cancelledRow("RefNum").ToString) Then
cancelledRow("RefNum") = "None"
Else
cancelledRow("RefNum") = "<a target='_blank' href='http://www.yahoo.com'>View</a>"
End If
Else
cancelledRow.Table.Columns.Add("RefNum", GetType(String))
cancelledRow("RefNum") = "None"
End If
If Not cancelledRow.Table.Columns.Contains("ViewLink") Then
cancelledRow.Table.Columns.Add("ViewLink", GetType(String))
End If
If Not String.IsNullOrEmpty(cancelledRow("SystemID").ToString) Then
cancelledRow("ViewLink") = "test3"
Else
cancelledRow("ViewLink") = "test4"
End If
cancelledTable.ImportRow(cancelledRow)
Next
dsCancelledData.DataSetName = "CancelledDataSet"
dsCancelledData.Tables(0).TableName = "CancelledTable"
thanks for looking