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

RadDataFilter and Advance Find with OpenAccess

1 Answer 88 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Garry asked on 31 Aug 2010, 02:11 PM
I want to know if RadDataFilter can handle the following scenario and if so how would you implement it. What I am needing is an advanced search feature and I think that RadDataFilter may fit. Below is the mock up of my advance search box.

                           <telerikData:RadDataFilter Name="radDataFilter" 
                              Source="{Binding Items, ElementName=listResidents}"
                           <StackPanel Orientation="Horizontal" Margin="5,2.5,5,2.5" DockPanel.Dock="Top">                               
                               <TextBox x:Name="textSearchAdvanced" MinWidth="192" ToolTip="Search Enities By LastName, FirstName, or TaxID(SSN)" Text="{Binding SimpleSearchText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                               <telerik:RadButton x:Name="btnFindAdvanced" Width="24" Margin="5 0" HorizontalAlignment="Right" VerticalAlignment="Center" 
                                              telerik:StyleManager.Theme="{Binding Source={StaticResource settings}, Path=Default.CurrentTheme}"
                                              Command="{Binding SimpleSearchCommand}" IsDefault="True">
                                       <Image Source="../Resources/Search.png" Height="16" Width="16" ToolTip="Find Resident"/>
                           <ListView Margin="5,2.5,5,2.5" Name="listResidents" ItemTemplate="{StaticResource ResidentTemplate}" ItemsSource="{Binding ResidentListing}" ext:Selected.Command="{Binding PersonSelectedCommand}" />
The issue though is that RadDataFilter doesn't actually populate the fields you can filter on until I load all of the data. Since I am using OpenAccess to mock up the business objects can it not just read the fields contained in the collection? Also since I am using OpenAccess each class can contain references to other classes. Is there a way to navigate this relationship tree so for example I have a Parent class that has a chail class and I want to search for a field in the child class. Is there a way to do that?

Please let me know if I am not making myself clear. I would really like to use RadDataFilter here, but I also can't pull every record and then start to filter them. Would be way to slow.


1 Answer, 1 is accepted

Sort by
Rossen Hristov
Telerik team
answered on 31 Aug 2010, 02:59 PM
Hello Garry Clark,

RadDataFilter needs to know what the item properties are. Otherwise, it will not show anything.

However, it does not need to receive its ItemProperties from the actual data source. They can be set manually. RadDataFilter can be used in its Unbound Mode in order to filter anything. An example of this Unbound Mode can be seen here.

Currently, this is about the closest it gets to the scenario you are describing. The basic idea is the following. You provide a set of item properties, RadDataFilter uses them and the user creates some filter conditions. This filter conditions are output through the FilterDescriptors collection of the control. You attach to the CollectionChanged and ItemChanged of this collection and in the event handlers you decide what to do with the information provided. Each FilterDescriptor has Member, Operator and Value. Based on these, you can filter anything.

the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Asked by
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question