Copy/Paste does not work with RiaService

Hi,


My app used Employee table in northwind database and RiaService to get data. Its very strange that the “Cut” function works but i can’t do Copy and Paste, the screen no changes
This is my xaml and code behind:


<Grid.Resources>






                    </StackPanel>

                </StackPanel>
            </Border>
        </DataTemplate>

        <DataTemplate x:Key="LinkTemplate">
            <Path go:LinkPanel.IsLinkShape="True"
                  Stroke="Black"
                  StrokeThickness="1"
                  go:Link.SelectionAdorned="True">
                <go:Link.Route>
                    <go:Route Routing="Orthogonal"
                              Corner="3">

                    </go:Route>
                </go:Link.Route>
            </Path>
        </DataTemplate>
    </Grid.Resources>
    <riaControls:DomainDataSource x:Name="dds"
                                  AutoLoad="True"
                                  Height="0"
                                  LoadedData="dds_LoadedData"
                                  QueryName="GetEmployees"
                                  Width="0"
                            >
        <riaControls:DomainDataSource.DomainContext>
            <web:NorthwindContext />
        </riaControls:DomainDataSource.DomainContext>
    </riaControls:DomainDataSource>
    <go:Diagram x:Name="diagram1"
                HorizontalAlignment="Left"
                Margin="10,0,0,0"
                VerticalAlignment="Top"
                MinHeight="300"
                NodeTemplate="{StaticResource NodeTemplate}"
                LinkTemplate="{StaticResource LinkTemplate}">
        <go:Diagram.Model>
            <go:UniversalTreeModel NodeKeyPath="EmployeeID"
                                   ParentNodePath="ReportsTo" />
        </go:Diagram.Model>

        <go:Diagram.Layout>

            <go:TreeLayout ConditionFlags="Standard NodeSizeChanged"
                           TreeStyle="LastParents"
                           Arrangement="Horizontal"
                           Alignment="BottomRightBus"
                           Angle="90"
                           AlternateAngle="90"
                           AlternateAlignment="BottomRightBus"
                           AlternateNodeSpacing="20"
                           AlternateLayerSpacing="20">

            </go:TreeLayout>

        </go:Diagram.Layout>

        <go:Diagram.DraggingTool>
            <go:DraggingTool DropOntoEnabled="True" />
        </go:Diagram.DraggingTool>
    </go:Diagram>
</Grid>

And this is codebehind:


if i used diagram1.NodesSource = e.Entities then the Cut function does not work


Can some one help me
Thanks
Khiem

That is because GoXam models know how to delete data objects from Lists, but they do not know how to copy those node data objects and serialize them.

What is the type of the Entities property, what does it inherit from, and what interfaces does it implement?
And the same questions for the type of data in the Entities collection.

Hi,


Thanks for quick rely
I used Entity object and the collection data is converted to List

Even if i converted IEnumerable to List it still does not work

Pls advice
Thanks

I believe that the Entity class is not serializable, so if your Employee class inherits from Entity and does not make special efforts to be serializable, you will not be able to put a collection of Employee objects in the clipboard.