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

Removing ItemPropertyDefinitions at runtime

5 Answers 79 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
Saravana Kumar
Top achievements
Rank 1
Saravana Kumar asked on 04 Jan 2011, 04:04 AM
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



5 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 04 Jan 2011, 12:27 PM
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
0
Saravana Kumar
Top achievements
Rank 1
answered on 04 Jan 2011, 07:11 PM
This is kind of show stopper for us, is there any dirty solution to get away fromt this?
0
Rossen Hristov
Telerik team
answered on 05 Jan 2011, 09:14 AM
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
0
Lilia
Top achievements
Rank 1
answered on 14 Jul 2011, 02:12 PM
I need the same behaviour in my project. Is there already a way to do this?
0
Rossen Hristov
Telerik team
answered on 14 Jul 2011, 02:26 PM
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!

Tags
DataFilter
Asked by
Saravana Kumar
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Saravana Kumar
Top achievements
Rank 1
Lilia
Top achievements
Rank 1
Share this question
or