How to get SQL statement from Radfilter

2 posts, 0 answers
  1. piet
    piet avatar
    4 posts
    Member since:
    Sep 2012

    Posted 24 Nov 2011 Link to this post


    When using the  RadFilterSqlQueryProvider and using a datetime field in the Radfilter the result of the provider.Result call is for example:

    ([date)] >= '23-11-2011 16:00:00')

    For SQL however one expects:
    ([date)] >= CONVERT(DATETIME, '2011-11-23 16:00:00', 102))

    The other providers of the Radfilter also don't give a result that could be used in a where clause of an SQL statement. Do you have a solution to this?
    One would expect that a custom sqlprovider (with base class RadFilterSqlQueryProvider) would be available for e.g. ms-sql and mysql.


  2. Mira
    Mira avatar
    1124 posts

    Posted 29 Nov 2011 Link to this post

    Hello Piet,

    You are indeed right - the current the providers do not contain one that is suitable for MySql queries. I have forwarded you request to our developers and they will consider implementing it.
    Currently, you can use a Regex for finding the dates and replacing them with their value in the correct format.

    I hope this helps.

    Best wishes,
    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. Telerik UI for ASP.NET Core is out
Back to Top