Programmatic Filtering Not Working

3 posts, 0 answers
  1. Mo
    Mo avatar
    1 posts
    Member since:
    Mar 2012

    Posted 27 Mar 2012 Link to this post

    Hi,
    I have a raddataservicedatasource setup in my xaml like below:
    <telerik:RadDataServiceDataSource x:Name="dataServiceDataSource" 
        AutoLoad="True"   QueryName="Accounts" Margin="320,21,320,193">
                    <telerik:RadDataServiceDataSource.DataServiceContext>
                        <local:MyEntities />
                    </telerik:RadDataServiceDataSource.DataServiceContext>
                </telerik:RadDataServiceDataSource>
    I am trying to filter in the backend using FilterDescriptors but for some reason it never seems to go back to the server and apply the filter descriptors. Also the canload property is false after I add the descriptor to the data source.
    Here is the code I am using to do the filtering:
    AccountDetailsFilter = new FilterDescriptor("accountID_pk", FilterOperator.IsEqualTo, a.accountID);
    dataServiceDataSource.FilterDescriptors.Add(AccountDetailsFilter);

    Any advice would be greatly appreciated.
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 28 Mar 2012 Link to this post

    Hello,

    One possible reason for CanLoad being false is that it cannot find a query named "Accounts" on the DataServiceContext or there is no property called "accountID_pk" on the entity, but we can't be sure since we do not have your project.

    In case this is not the problem, I have attached a working sample project. Can you please modify it so it does reproduce the issue you are having and send it back to us for debugging.

    Thanks in advance.

    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 >>
  3. Stella
    Stella avatar
    1 posts
    Member since:
    Sep 2017

    Posted 07 Sep Link to this post

    After looking this post I disappointed because few days ago I need to get helpful solution my project where similar issue I had to face but there was no way in front of me to obtain anyone's help and then I had to get that problem solved with web development company in London who acquire me some charges for it. But I extremely did not have an idea that through these kinds of platform where lots of people ask for solution of their problems and also they get positive answer by people. Now own words I will even recommend checking this type of place. 
Back to Top