In order to persist a datatable, you can easily add it to the Viewstate, by creating a property in your class:
What I do in many circumstances, is, like the last post said, pass the DataTable to viewstate as a property of the class:
Private Property EmployeeData() As System.Data.DataTable
Get
Dim o As Object = ViewState("EmployeeData")
If o Is Nothing Then
Return Nothing
Else
Return o
End If
End Get
Set(ByVal value As System.Data.DataTable)
ViewState("EmployeeData") = value
End Set
End Property
Now, whenever you need to repopulate, or add a row, remove a row, etc – just refer to the property “EmployeeData”