Binding QueryParameter to DataContext value

8 posts, 0 answers
  1. plusHR
    plusHR avatar
    58 posts
    Member since:
    Aug 2012

    Posted 15 Feb 2012 Link to this post

    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'
  2. plusHR
    plusHR avatar
    58 posts
    Member since:
    Aug 2012

    Posted 15 Feb 2012 Link to this post

     <telerik:QueryParameter ParameterName="personguid" Value="{Binding personguid, Mode=OneWay}" /> for some reason setting the mode made it all work. Thanks Paul
  3. DevCraft banner
  4. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 15 Feb 2012 Link to this post

    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 >>
  5. plusHR
    plusHR avatar
    58 posts
    Member since:
    Aug 2012

    Posted 15 Feb 2012 Link to this post

    Yes it is working fine, I think I was just having a "blonde" moment. Thanks for the prompt response.
    Regards
    Paul
  6. Oleg
    Oleg avatar
    3 posts
    Member since:
    Sep 2015

    Posted 07 Sep 2015 in reply to Rossen Hristov Link to this post

    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?

  7. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 10 Sep 2015 Link to this post

    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
  8. Oleg
    Oleg avatar
    3 posts
    Member since:
    Sep 2015

    Posted 05 Oct 2015 in reply to Maya Link to this post

    Hello Maya,

    Is there any news about page number problem?​

  9. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 08 Oct 2015 Link to this post

    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
Back to Top
DevCraft banner