Good day,
I am using 2 gridview in asp.net, one getting results from an AD Lookup Powershell and on selected index change I basically grab the cell value and insert a row in the second gridview.
My issue is that when I insert a row in my second gridview instead of adding it to the gridview it replace the record that is currently there.
Here is my code to add:
Protected Sub SearchResultsGridView_SelectedIndexChanged(sender As Object, e As EventArgs) Handles SearchResultsGridView.SelectedIndexChanged
Dim row As GridViewRow = SearchResultsGridView.SelectedRow
Dim strDisplayName As String = row.Cells(0).Text.ToString()
UsersToAddGridView.Visible = True
If ViewState("CurrentTable") IsNot Nothing Then
Dim dt As DataTable = DirectCast(ViewState("CurrentTable"), DataTable)
Dim dr As DataRow = Nothing
If dt.Rows.Count &g ...
Go to the complete details ...