DataFilter FilterDescriptors.LogicalOperator Changed event

5 posts, 1 answers
  1. Shankar
    Shankar avatar
    26 posts
    Member since:
    Dec 2011

    Posted 06 May 2013 Link to this post

    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?
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 07 May 2013 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Shankar
    Shankar avatar
    26 posts
    Member since:
    Dec 2011

    Posted 09 May 2013 Link to this post

    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?
  5. Answer
    Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 10 May 2013 Link to this post

    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.

  6. Shankar
    Shankar avatar
    26 posts
    Member since:
    Dec 2011

    Posted 14 May 2013 Link to this post

    @Didie, that worked, thanks!
Back to Top
UI for WPF is Visual Studio 2017 Ready