RadDataFilter and Advance Find with OpenAccess

2 posts, 0 answers
  1. Garry
    Garry avatar
    205 posts
    Member since:
    Nov 2010

    Posted 31 Aug 2010 Link to this post

    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.

    <DockPanel>
                               <telerikData:RadDataFilter Name="radDataFilter" 
                                  DockPanel.Dock="Top" 
                                  Source="{Binding Items, ElementName=listResidents}"
                                  Margin="1"/>
                               <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">
                                       <telerik:RadButton.Content>
                                           <Image Source="../Resources/Search.png" Height="16" Width="16" ToolTip="Find Resident"/>
                                       </telerik:RadButton.Content>
                                   </telerik:RadButton>
                               </StackPanel>
                               <ListView Margin="5,2.5,5,2.5" Name="listResidents" ItemTemplate="{StaticResource ResidentTemplate}" ItemsSource="{Binding ResidentListing}" ext:Selected.Command="{Binding PersonSelectedCommand}" />
                           </DockPanel>
     
    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.

    Thanks!
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 31 Aug 2010 Link to this post

    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.

    Greetings,
    Ross
    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
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top