It appears that cell values are not preserved during cut, copy, and paste operations even though the clipboard does capture values for the cells.
Is that a bug or just something which must be overridden in a derived node class?
Some more information: I checked the clipboard before paste and it includes all cell values, including a cellappearance image. And I checked the beforepaste event e.nodes(0).cells and all values are present.
Seems like it might be a bug to get all the way to the paste step and then lose the cell values.
[More, later]
It appears that the cellappearance.image does appear in the pasted nodes (checked the e.nodes(0).cells(1).cellappearance.image object in AfterPaste event). But both the text and value fields are empty.
The plot thickens. I tried to pull out the values from cells in BeforePaste event so that I could correct them in the After Paste Event.
Even though I could see values in debugger, could not access the values in my code. Here's the event handler:
Dim pastedvalues() As Object
pastedvalues(0) = e.Nodes.Item(0).Cells(0).Value pastedvalues(1) = e.Nodes.Item(0).Cells(1).ValueEnd Sub
I get an exception at "Dim o4 . . ." line:
An unhandled exception of type 'System.NullReferenceException' occurred in infragistics.win.ultrawintree.v7.1.dllAdditional information: Object reference not set to an instance of an object.
. . . . Did some more work on this:
To work around this problem, had to cancel the cut and paste operations in BeforeCut and BeforePaste event handlers and substitute alternative logic. This tree is not bound to a data source. Perhaps this works with a bound data source.
Here's some of the logic of the workaround: