Hope you are doing well.
Recently, I did an Enterprise Portal code upgrade for one of my customers. They are on Dynamics AX 2009 and as I was investigating, I found that the web forms of Dynamics AX 4.0 were not upgraded by their previous vendor, so I undertook the task of upgrading their 20+ web forms (Dynamics AX 4.0) to Dynamics AX 2009 web controls.
I had to replace the existing standard filters which comes with EP AxGridView to custom textbox filters. And, for this reason I had to apply the filters via code. I got a good idea by seeing this useful blog on how to achieve it http://blogs.msdn.com/b/epblog/archive/2008/11/17/filtering-a-dataset-from-code-behind.aspx
There was a small hiccup while referencing FilterCondition and Typ as I didn't knew the namespace, so before we use the filterObject and conditionType objects, dont forget to declare the below highlighted namespace.