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

Get Editor and Expression

1 Answer 89 Views
Filter
This is a migrated thread and some comments may be shown as answers.
Fergal
Top achievements
Rank 1
Fergal asked on 18 Jun 2013, 09:16 AM
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?

Thanks
Fergal

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 21 Jun 2013, 05:55 AM
Hello,

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.

Regards,
Andrey
Telerik
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.
Tags
Filter
Asked by
Fergal
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or