I have a ria DDS query whose parameter is bound to a dependency property of the code behind my silverlight page. The issue is that once the project dependency is changed I get the following error.
QueryParameters cannot be changed when CanLoad is false. Changing the QueryParameters initiates a load operation, and load operations are not permitted when CanLoad is false. Controls that invoke load operations should be disabled when CanLoad is false.
I'm at a loss on how to complete or cancel the load so I can change the details view for a project every time a new project is selected from a list.
<riaControls:DomainDataSource AutoLoad="True" d:DesignData="{d:DesignInstance my1:XT_PROJECTS, CreateList=true}" Height="0" LoadedData="ProjectDetailsDomainDataSource_LoadedData" Name="ProjectDetailsDomainDataSource" QueryName="getProjectDetails" Width="0" >
<riaControls:DomainDataSource.DomainContext>
<my:MYservices />
</riaControls:DomainDataSource.DomainContext>
<riaControls:DomainDataSource.QueryParameters>
<riaControls:Parameter ParameterName="project" Value="{Binding ElementName=ProjectDetailsPage, Path=project}" />
</riaControls:DomainDataSource.QueryParameters>
</riaControls:DomainDataSource>
public static readonly DependencyProperty projectIDDP =
DependencyProperty.Register("project", typeof(string),typeof(ProjectDetails),
new PropertyMetadata(""));
public string projectID
{
get
{
return (string)GetValue(projectIDDP);
}
set
{
SetValue(projectIDDP, value);
}
}