2 posts, 0 answers
  1. Pablo Tola
    Pablo Tola avatar
    43 posts
    Member since:
    Nov 2007

    Posted 23 Jul 2010 Link to this post

    Is there a way to use the datafilter control without a datasource?

    I need this kind of control to create filter expressions and save them for later use. I need to provide my own columns without the control getting them from a datasource and save the completed filter expression in a database table for later retrieval.

    Thanks for your help.
  2. Rossen Hristov
    Rossen Hristov avatar
    2478 posts

    Posted 23 Jul 2010 Link to this post

    Hello Pablo Tola,

    Yes. RadDataFilter is designed to support the so-called "Unbound Mode". When in unbound mode, you as a developer must "tell" the filter what the properties are. This is made through its ItemProperties property which accepts a ReadOnlyCollection<ItemPropertyInfo>. Once you pass in the item properties, the user will start creating some filters. You can detect what he is doing by looking at another property of the DataFilter called FilterDescriptors. This collection holds the expressions that the user has created.

    Here is a ascii art diagram:

    ---> ItemProperties->RadDataFilter->FilterDescriptors--->

    An example of this exact setting you can see here. It is for Silverlight, but the code is 100% the same. It is for Silverlight only because we are using unbound RadDataFilter to filter a DomainDataSource control. Exactly like your case, with the only difference that you will use the created FilterDescriptors for something else. Our SL/WPF code-base is shared so the code is 100% identical.

    Let me know if you have problems and I will do my best to help you.

    All the best,
    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
Back to Top