|
-
Oct 10th, 2002, 12:46 PM
#1
Thread Starter
New Member
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.
-
Oct 10th, 2002, 05:30 PM
#2
Fanatic Member
Looks like the .MemberwiseClone method is what you're looking for:
ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfsystemobjectclassmemberwiseclonetopic.htm
-
Nov 22nd, 2005, 04:11 AM
#3
New Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|