Essentially, I have based my code on info from the following links:
I must add that I'm not doing the following:
1. I'm not handling the ItemClick event for the filter menu item (because it doesn't consistently fire for some reason)
2. I'm also not handling the ItemCommand event of the RadGrid because it seems to me that when this event is fired (when using template columns), only the original filter selection (prior to the postback) is available and not the new selection.
3. Another note - I've found that handling events like the OnTextChanged for a textbox in the filtering item cell tends to mess things up a little (in terms of when the selected filter function becomes available). If things don't seem to be working, it may be an idea to disable these event handlers and see if it makes a difference.
In the EvaluateFIlterExpression method, you simply create your custom filter expression and return it. Sample code below:
override string EvaluateFilterExpression(GridFilteringItem filteringItem)
string filter = string.Empty;
TableCell cell = filteringItem[this.UniqueName];
TextBox tbPattern = cell.Controls as TextBox;
if (tbPattern.Text != string.Empty)
if (this.CurrentFilterFunction == GridKnownFunction.Custom)
//Create your filter expression for the Custom filter
//Create your filter expression for the other known filters
Hope that helps.