How to get the Filter Expression in XML Formet

2 posts, 0 answers
  1. Gaurav
    Gaurav avatar
    4 posts
    Member since:
    Sep 2010

    Posted 03 Nov 2010 Link to this post

    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!!!
  2. Tsvetina
    Tsvetina avatar
    1863 posts

    Posted 09 Nov 2010 Link to this post

    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
  3. DevCraft R3 2016 release webinar banner
Back to Top