Limit number of filter descriptors

8 posts, 0 answers
  1. ianr
    ianr avatar
    14 posts
    Member since:
    Mar 2010

    Posted 26 Aug 2010 Link to this post

    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.
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 26 Aug 2010 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. ianr
    ianr avatar
    14 posts
    Member since:
    Mar 2010

    Posted 26 Aug 2010 Link to this post

    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.
  5. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 26 Aug 2010 Link to this post

    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
  6. Shankar
    Shankar avatar
    26 posts
    Member since:
    Dec 2011

    Posted 03 Aug 2012 Link to this post

    Hi Ross,

    Is this feature supported in the new version of Telerik? Please let me know
  7. Yordanka
    Admin
    Yordanka avatar
    634 posts

    Posted 03 Aug 2012 Link to this post

    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.

  8. Thomas
    Thomas avatar
    2 posts
    Member since:
    Jun 2016

    Posted 20 Jul in reply to Yordanka Link to this post

    Hi, is there any chance this has been implemented since the last post in 2012? Thanks!
  9. Stefan X1
    Admin
    Stefan X1 avatar
    523 posts

    Posted 22 Jul Link to this post

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