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

Programmatic Filtering Not Working

3 Answers 97 Views
DataServiceDataSource
This is a migrated thread and some comments may be shown as answers.
Mo
Top achievements
Rank 1
Mo asked on 27 Mar 2012, 10:05 PM
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.

3 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 28 Mar 2012, 09:21 AM
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 >>
0
Stella
Top achievements
Rank 1
answered on 07 Sep 2017, 06:21 PM
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. 
0
Muneeb
Top achievements
Rank 2
answered on 22 Feb 2019, 04:24 AM
I was very confused about the solution to this problem. I had also faced the same issue.  When I was started my project, programmatic filtering not working properly. I was searching for the solution so I found [url=https://www.branex.co.uk/]website development London Agency[/url] in this concerned. Now my problem has been solved by the experts.
Tags
DataServiceDataSource
Asked by
Mo
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Stella
Top achievements
Rank 1
Muneeb
Top achievements
Rank 2
Share this question
or