This is a migrated thread and some comments may be shown as answers.

Binding QueryParameter to DataContext value

7 Answers 113 Views
DomainDataSource
This is a migrated thread and some comments may be shown as answers.
plusHR
Top achievements
Rank 1
plusHR asked on 15 Feb 2012, 02:39 PM
Hi.

I have read up on your documentation and examples but I cannot get the query value to bind to a value within the datacontext. When I try the query the parameter value is not correct. The two paramters are GUID's however it passes a blank GUID as the personguid

<Grid.Resources>
         <telerik:RadDomainDataSource x:Key="ddsEntitlements"
                                      AutoLoad="True"
                                      QueryName="GetAllowancesForPersonAndType"
                                      
                                     >
             <telerik:RadDomainDataSource.QueryParameters>
                 <telerik:QueryParameter ParameterName="personguid" Value="{Binding personguid}" />
                 <telerik:QueryParameter ParameterName="absencetype" Value="d859e02e-eaec-402e-ba21-6ebff3e66240"  />
 
             </telerik:RadDomainDataSource.QueryParameters>
             <telerik:RadDomainDataSource.DomainContext>
                 <e:AppDomainContext />
             </telerik:RadDomainDataSource.DomainContext>
         </telerik:RadDomainDataSource>
     </Grid.Resources>

WHERE ([Extent1].[person] = @p__linq__0) AND ([Extent2].[absencetype] = @p__linq__1)',N'@p__linq__0 uniqueidentifier,@p__linq__1 uniqueidentifier',@p__linq__0='0156C084-9DD9-4301-95D0-9E8EFE3ECCC7',@p__linq__1='00000000-0000-0000-0000-000000000000'

7 Answers, 1 is accepted

Sort by
0
plusHR
Top achievements
Rank 1
answered on 15 Feb 2012, 02:47 PM
 <telerik:QueryParameter ParameterName="personguid" Value="{Binding personguid, Mode=OneWay}" /> for some reason setting the mode made it all work. Thanks Paul
0
Rossen Hristov
Telerik team
answered on 15 Feb 2012, 03:08 PM
Hi,

I prepared a sample project and it works correctly. No need to set a OneWay mode in my project.

You may find it attached.

Kind regards,
Ross
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
plusHR
Top achievements
Rank 1
answered on 15 Feb 2012, 03:14 PM
Yes it is working fine, I think I was just having a "blonde" moment. Thanks for the prompt response.
Regards
Paul
0
Oleg
Top achievements
Rank 1
answered on 07 Sep 2015, 02:03 PM

Hi,
i have a small question about attached solution

All works fine except one moment

Enter any page number (for ex 5) and press 'Enter'.

Choosen page number ('5') was replaced by '1' while loading

Any workaround for this problem?

0
Maya
Telerik team
answered on 10 Sep 2015, 12:51 PM
Hello Oleg,

Indeed, you are right. I managed to reproduce the issue. We will investigate it and write you back once we have more information. 

Regards,
Maya
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Oleg
Top achievements
Rank 1
answered on 05 Oct 2015, 09:32 AM

Hello Maya,

Is there any news about page number problem?​

0
Maya
Telerik team
answered on 08 Oct 2015, 08:05 AM
Hello Oleg,

We logged the issue in the feedback portal and you can follow its progress from there. 

Regards,
Maya
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
DomainDataSource
Asked by
plusHR
Top achievements
Rank 1
Answers by
plusHR
Top achievements
Rank 1
Rossen Hristov
Telerik team
Oleg
Top achievements
Rank 1
Maya
Telerik team
Share this question
or