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

Limit number of filter descriptors

7 Answers 57 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
ianr
Top achievements
Rank 1
ianr asked on 26 Aug 2010, 02:04 PM
Hi,

Is there a way to limit the number of filters that can be added using the control?  I am using the RadDataFilter with the CanUserCreateCompositeFilters set to false, so there will be no nested queries.

If for example, I wanted to only allow up to 4 query conditions to be set, how would I enforce this?  I have looked for a property to set an upper limit, but have not found one.

I have also attempted to enforce this through event handlers in the code-behind.  E.g:

Handle the filter controls FilterDescriptors.CollectionChanging event.  In this event handler, if the count has reached the limit, then set e.Cancelled to true.  This behaves a little strangely because once the limit has been reached, it does in fact stop descriptors being added by cancelling the event (and this can be verified by looking at the control's data in the debugger - the collection count never goes above 4), but the control in the view continually draws new descriptors.  It allows you to edit the values of the descriptors and so on, but the query that is executed ignores them.  So - I seem to have successfully stopped them being added, but they are still drawn.

Is this behaviour expected, and is there a way to enforce a limit?

Thanks.

7 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 26 Aug 2010, 02:12 PM
Hello ianr,

Currently there is no way to limit the amount of filters. Cancelling the collection changing is definitely not the way to go. It is not there for that purpose. Please, do not use it in this way.

I have logged your feature request in our PITS system. Please, vote for it in order to elevate its priority. I hope that I will be able to provide this feature soon.

Thank you for your great suggestion. RadDataFilter is still a young control and we want to shape it according to our customers' suggestions.

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
0
ianr
Top achievements
Rank 1
answered on 26 Aug 2010, 02:23 PM
Thanks for the reply.  I have voted for this feature, but I noticed that it had been added to PITS for silverlight, while I am using the WPF version.

Regards.
0
Rossen Hristov
Telerik team
answered on 26 Aug 2010, 03:12 PM
Hi ianr,

I am sorry. They are mirrored since we share the same code-base for the two platforms and therefore develop features for both. Here is the link for its WPF counterpart.

Regards,
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
0
Shankar
Top achievements
Rank 1
answered on 03 Aug 2012, 05:24 AM
Hi Ross,

Is this feature supported in the new version of Telerik? Please let me know
0
Yordanka
Telerik team
answered on 03 Aug 2012, 08:54 AM
Hi Shankar,

Unfortunately, this feature is not available with the current implementation of RadDataFilter.
 
Kind regards,
Yordanka
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Thomas
Top achievements
Rank 1
answered on 20 Jul 2016, 07:36 PM
Hi, is there any chance this has been implemented since the last post in 2012? Thanks!
0
Stefan
Telerik team
answered on 22 Jul 2016, 01:16 PM
Hello,

By the time being, such feature is not supported out-of-the-box by RadDataFilter. I, however, prepared a sample application demonstrating how such customization can be achieved. I hope it suits your needs. Please, bear in mind, that this is a custom implementation aiming to satisfy this particular requirement. I cannot ensure that it will work as expected in all scenarios (when the CanUserCreateCompositeFilters property is not set to False, for example).

All the best,
Stefan X1
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
DataFilter
Asked by
ianr
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
ianr
Top achievements
Rank 1
Shankar
Top achievements
Rank 1
Yordanka
Telerik team
Thomas
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or