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

DataFilter FilterDescriptors.LogicalOperator Changed event

4 Answers 87 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
Shankar
Top achievements
Rank 1
Shankar asked on 06 May 2013, 04:53 PM
Hi, we need an event to be fired from the control, when one of the logical operators (AND/OR) are being changed by the user. Is there a way to achieve this?

4 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 07 May 2013, 07:11 AM
Hello,

 
You could attach to the RadDataFilter.FilterDescriptors.PropertyChanged event similar to:

this.radDataFilter1.FilterDescriptors.PropertyChanged += new PropertyChangedEventHandler(FilterDescriptors_PropertyChanged);
  
void FilterDescriptors_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
    if (e.PropertyName == "LogicalOperator")
    {
        // I am no sure what you will do here though...
    }
}

Does it work for you?

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Shankar
Top achievements
Rank 1
answered on 09 May 2013, 05:58 PM
Thank you Didie, this works fine at the root level.

However this is being fired only when the Logical Operator at the root level is being changed, and not for the subsequent ones. Do I have to recursively handle property changed? Why is it not Notifying despite being an ObservableCollection?
0
Accepted
Dimitrina
Telerik team
answered on 10 May 2013, 07:58 AM
Hello,

In that case you should subscribe for the ItemChanged event, for example:

void FilterDescriptors_ItemChanged(object sender, ItemChangedEventArgs<IFilterDescriptor> e)
{
    if (e.PropertyName == "LogicalOperator")
    {
        // do your stuff
    }
}
  Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Shankar
Top achievements
Rank 1
answered on 14 May 2013, 06:34 AM
@Didie, that worked, thanks!
Tags
DataFilter
Asked by
Shankar
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Shankar
Top achievements
Rank 1
Share this question
or