Vb.net First row as header in datatable
I have the datatable
Example:
Solution:
Vb.net Code
I have the datatable
Example:
Solution:
Vb.net Code
'Assign Column Name
For i As Integer = 0 To dtFinalImport.Columns.Count - 1
If dtFinalImport.Rows.Count > 0 Then
dtFinalImport.Columns(i).ColumnName = dtFinalImport.Rows(0)(i)
End If
Next
dtFinalImport.Rows(0).Delete()
dtFinalImport.AcceptChanges()
0 Comments