Hi Bert,
The FilterDescriptor itself is not capable of performing such an operation.
I am afraid that the LINQ data engine does not expose any event to override the LINQ logic. You will have to code your own filter mechanism -- when it is possible.
In your case you can develop a method (called predicate) to execute the filtering - so you can benefit from our generic class FilterDescriptor<T>.
The FilterDescriptor<T> allows you to directly plug a predicate that determines which items are filtered. You just need to set a lambda to the FilteringExpression property like so:
var descriptor = new
FilterDescriptor<Employee>
{
FilteringExpression = employee => this.PassesFilter(employee)
};
private bool PassesFilter(Employee employee, <<your filtering criteria gathered from the custom filtering control UI>>){...}
So you will add this generic FilterDescriptor to the grid from your custom filtering control and the LINQ engine will use this predicate when it builds the Where clause.
I hope this helps.
Regards,
Didie
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time.
Watch the videos and start improving your app based on facts, not hunches.