"SQL" Like Where Clause FROM RadFilter

2 posts, 0 answers
  1. Michael
    Michael avatar
    6 posts
    Member since:
    Aug 2010

    Posted 01 Mar 2012 Link to this post

    I remember a few releases ago I was able to get an "SQL" where clause from the filter criteria. Has this functionality been moved? I see the save settings option but I don't think my users will understand base64. I would love to be able to use the filter do generate custom reports.
  2. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 06 Mar 2012 Link to this post

    Hi Michael,

    The RadFilter control exposes query providers for a number of different syntaxes, including SQL. You can use the ApplyExpressions server event to get an expression built using the required syntax:
    protected void RadFilter1_ApplyExpressions(object sender, RadFilterApplyExpressionsEventArgs e)
    {
        RadFilterSqlQueryProvider provider = new RadFilterSqlQueryProvider();
        provider.ProcessGroup(e.ExpressionRoot);
        Response.Write(provider.Result);
    }

    For more information on building filter expressions you can check out this help article:
    http://www.telerik.com/help/aspnet-ajax/filter-building-expressions.html

    All the best,
    Tsvetina
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top