Problem with Datarow Objects
I know this is probably a very easy solution , but I can't find anything anywhere. Basically what I am trying to do is make a copy of a datarow , and delete the current one (for a kind of cut/paste routine). This is my current code :
'create new dataview
Dim dvTemp As New DataView(dsReports.Tables(0))
'create filtered view
dvTemp.RowFilter = "Rowid = " & CStr(RowID)
'get first item in view (filter willl only return 1 item) and copy to clipboard datarow
drRowClipBoard = dvTemp.Item(0).Row
dvTemp.Item(0).Row.Delete()
what is happening is when I call the delete() procedure on the datarow , it will delete the datarow that im storing in the drRowClipBoard object as well , I'm assuming because it is just a reference to the other row and not a copy , how do I make a copy?
Hopefully this makes some sense.
Re: Problem with Datarow Objects
i had the same problem and i found this page
http://www.firelightsoftware.com/CopyPasteDataset.aspx
sounds logical ... or???
... you can only copy seriazible objects to clipboard... so put the rows in a dataset and copy the dataset to clipboard