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

How to get the Filter Expression in XML Formet

1 Answer 105 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Gaurav asked on 03 Nov 2010, 01:28 PM
Hello All,

I have to use the RAD Filter on the DataSource at place of the current view of the grid. and this I am doing with the RAD Filter for DataSource.
But my problem is that the I want to fetch the  "Filter Expression" generated by the  RADFilter ; and make it convert in to the XML format.

For example:

Please Help me to do the same....

Thanks in Advance!!!

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 09 Nov 2010, 10:26 AM
Hello Gaurav,

You need to handle the OnApply event of RadFilter and extract the filter expression there, by performing these steps:
  1. A query provider is declared. The query provider will determine the type of the filter expression, and its syntax. For example, Sql, Linq, Oql or EntitySql.
  2. The ProcessGroup() method of the above-declared provided is called. This causes the filter expression to be stored in the .Result variable of the provider.
  3. The provider.Result variable can be accessed directly, to get the filter expression.
For example:
protected void RadFilter1_Apply(object sender, EventArgs e)
   RadFilterSqlQueryProvider provider = new RadFilterSqlQueryProvider();
   var r = provider.Result;

Sincerely yours,
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question