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

Customization

1 Answer 105 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
Pablo Tola
Top achievements
Rank 2
Pablo Tola asked on 23 Jul 2010, 07:49 AM
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.

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 23 Jul 2010, 09:03 AM
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,
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
Tags
DataFilter
Asked by
Pablo Tola
Top achievements
Rank 2
Answers by
Rossen Hristov
Telerik team
Share this question
or