lgropper
asked on
Error with DataTable Transfer
I have a strange error...
Situation:
I have two DataTables (dtLinkedList and dtUnLinkedList)
I have two DataGrids (dgLinked and dgUnLinked)
I want to click a button and add items from one DataTable and DataGrid to the other DataTable and DataGrid
but when I have added more than 2 or 3 items from the dtUnLinkedList to the dtLinkedList , it just keeps adding the same item over and over again.
My Code
Dim LinkedRow As DataRow = dtLinkedList.NewRow
LinkedRow(0) = Me.dgUnLinked.Item(Me.dgUn Linked.Cur rentRowInd ex, 0)
LinkedRow(1) = Me.dgUnLinked.Item(Me.dgUn Linked.Cur rentRowInd ex, 1)
dtLinkedList.Rows.Add(Link edRow)
dtUnLinkedList.Rows.Remove At(Me.dgUn Linked.Cur rentRowInd ex)
Me.dgLinked.Refresh()
Me.dgUnLinked.Refresh()
Me.dgLinked.CurrentRowInde x = 0
Me.dgUnLinked.CurrentRowIn dex = 0
HELP!
Situation:
I have two DataTables (dtLinkedList and dtUnLinkedList)
I have two DataGrids (dgLinked and dgUnLinked)
I want to click a button and add items from one DataTable and DataGrid to the other DataTable and DataGrid
but when I have added more than 2 or 3 items from the dtUnLinkedList to the dtLinkedList , it just keeps adding the same item over and over again.
My Code
Dim LinkedRow As DataRow = dtLinkedList.NewRow
LinkedRow(0) = Me.dgUnLinked.Item(Me.dgUn
LinkedRow(1) = Me.dgUnLinked.Item(Me.dgUn
dtLinkedList.Rows.Add(Link
dtUnLinkedList.Rows.Remove
Me.dgLinked.Refresh()
Me.dgUnLinked.Refresh()
Me.dgLinked.CurrentRowInde
Me.dgUnLinked.CurrentRowIn
HELP!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER