Get Editor and Expression

2 posts, 0 answers
  1. Fergal
    Fergal avatar
    23 posts
    Member since:
    Jun 2012

    Posted 18 Jun 2013 Link to this post

    Hi All,

    I have created a custom RadFilterDataFieldEditor to manage a specific set of my data. I need to do some additional work in code with any expressions created that are using this Editor (but only when they use a specific operator - Equal To).

    Looking at the code, I can't seem to get the expression and the Editor at the same time. If I get to the RadFilterSingleExpressionItem, it has an Editor property that I can see at runtime, but is protected - so I can't access it. The Expression itself doesn't seem to have a link, and if I go in via the FieldEditors property on the RadFilter, I can get the Editors but they don't seem to have a link to the expression.

    Basically, I want to do the below (aircoded):

    If typeof(Editor) is MyCustomEditor and expression.FilterFunction = EqualTo Then
      'Do Custom Work
    End If

    Can anyone point out how to achieve this?

  2. Andrey
    Andrey avatar
    836 posts

    Posted 21 Jun 2013 Link to this post


    In order to get the filter function you will need to hook the ExpressionEvaluated event as demonstrated in this help topic.

    Give this approach a try and you should not have problems.

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. DevCraft R3 2016 release webinar banner
Back to Top