I'm trying to bind a DataForm and DataGrid to a DomainDataSource and implement the functionality of adding, deleting and editing items.
Everything works very well for the DataForm part. But how I'm able to add a new record using the DataGrid? Like I know until now, there are two working options:
Add a new - "blank" - item to the DataView.
- Problem: I'm getting validatoin errors as a result of key requirements and constraints.
Using the "SDK feature to enable Add New Row capabilities in DataGrid control" from Silverlight 4 service release (September 2010)
- Problem: What exactly has changed? There are no new members or a documentation.
Here are some basic markup declarations matching the most important parts of my project:
<Grid x:Name="LayoutRoot">
<sdk:DataGrid x:Name="ParentGrid" AutoGenerateColumns="False" ItemsSource="{Binding ElementName=parentDomainDataSource, Path=Data}"/>
<toolkit:DataForm x:Name="ParentForm" CommandButtonsVisibility="All" Grid.Row="1" ItemsSource="{Binding ElementName=parentDomainDataSource, Path=Data}"/>
<sdk:DataGrid x:Name="ChildGrid" Grid.Column="1" AutoGenerateColumns="False" ItemsSource="{Binding ElementName=childDomainDataSource, Path=Data}"/>
<toolkit:DataForm x:Name="ChildForm" CommandButtonsVisibility="All" ItemsSource="{Binding ElementName=childDomainDataSource, Path=Data}"/>
<riaControls:DomainDataSource AutoLoad="True" d:DesignData="{d:DesignInstance my1:Child, CreateList=true}" Name="childDomainDataSource" QueryName="GetChildrenQuery"
DomainContext="{StaticResource domainCtx}"/>
</riaControls:DomainDataSource>
<riaControls:DomainDataSource AutoLoad="True" d:DesignData="{d:DesignInstance my1:Parent, CreateList=true}" Name="parentDomainDataSource" QueryName="GetParentsQuery"
DomainContext="{StaticResource domainCtx}"/>
</Grid>
Unfortunately, I'm running out of time.
Thanks in advance for any help. Best regards from Germany. Hope anybody can help ;)