Removing ItemPropertyDefinitions at runtime

6 posts, 0 answers
  1. Saravana Kumar
    Saravana Kumar avatar
    21 posts
    Member since:
    Jul 2006

    Posted 03 Jan 2011 Link to this post

    Hello,

    I'm using the RadDataFilter in unbounded mode. I'm struggling to get this functionality working. The requirement is once the user has filtered on a particular property, then I need to remove it from the list so the user can't filter on the same property again.

    I'll give an example. If the employee object got 3 properties (Name, age and dob), the use has selected "age > 30", then age should not appear in the list anymore.

    There are only couple of events exposed on RadDataFilter (EditorCreated and FilterOperatorsLoading). I tried to do something like this in the EditorCreated event handler

                this.radDataFilter.ItemPropertyDefinitions.Clear();

                foreach (var item in AvailableProperties)
                {
                    this.radDataFilter.ItemPropertyDefinitions.Add(new ItemPropertyDefinition(item));
                }
    but the "Clear()" method on ItempPropertyDefinitions throws an HRESULT COM exception.

    I kind of reached a brick wall, can you please confirm whether its possible to implement this.

    Regards,
    Saravana



  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 04 Jan 2011 Link to this post

    Hi Saravana Kumar,

    Unfortunately, this would not be possible with the current version of RadDataFilter. To be honest, I don't think that we will be able to develop similar functionality, since the architecture of the control will not allow it. Thank you for your understanding.

    Best wishes,
    Ross
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. DevCraft banner
  4. Saravana Kumar
    Saravana Kumar avatar
    21 posts
    Member since:
    Jul 2006

    Posted 04 Jan 2011 Link to this post

    This is kind of show stopper for us, is there any dirty solution to get away fromt this?
  5. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 05 Jan 2011 Link to this post

    Hi Saravana Kumar,

    I understand your requirements, but such behavior was never part of the control specification and functionality.

    I am afraid that there is no "hack" that can help either. Thank you for your understanding.

    Regards,
    Ross
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  6. Lilia
    Lilia avatar
    32 posts
    Member since:
    Mar 2011

    Posted 14 Jul 2011 Link to this post

    I need the same behaviour in my project. Is there already a way to do this?
  7. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 14 Jul 2011 Link to this post

    Hello Lilia,

    As I have already mentioned, this behavior was never part of the control design and I seriously doubt that it will ever be.

    Kind regards,
    Ross
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Back to Top
DevCraft banner