Filtering IsNull on DateTimeColumn

6 posts, 0 answers
  1. Terry Webster
    Terry Webster avatar
    48 posts
    Member since:
    Aug 2003

    Posted 30 Jul 2009 Link to this post

    I am using an Object Datasource that is calling a SQL Server stored procedure.  It returns 10 records.  Two of the columns are datetime columns.  When using the DateTime Column in RadGrid, I can filter just fine on the dates.  HOWEVER, one record has a NULL value.  When I try to filter the column using the IsNull option in the filter drop down menu, NO records are returned.  I have looked into my options in the typed dataset tableadapter, but it will not allow me to change the NullValue to anything other than Throw Exception.

    Any ideas on how to resolve this issue?

    Thanks,

    Terry Webster
  2. Terry Webster
    Terry Webster avatar
    48 posts
    Member since:
    Aug 2003

    Posted 30 Jul 2009 Link to this post

    After further testing, it appears that IsNull is not working on any columns.  I have even tried adjusting the TableAdapters for the string columns to return Empty or Nothing and it still fails to filter.

    Is this a bug in Telerik RadGrid Column Filtering?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Terry Webster
    Terry Webster avatar
    48 posts
    Member since:
    Aug 2003

    Posted 31 Jul 2009 Link to this post

    Is there anyone out here that is experiencing the same issue?  If so, has there been a resolution?

    Need help on this one...
  5. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 04 Aug 2009 Link to this post

    Hello Terry,

    I am pasting here the reply I provided in the support ticket you opened with regards to the same subject:

    Can you please check whether setting the EnableLinqExpressions property of the grid to false produces the desired result? By default RadGrid for ASP.NET AJAX uses LINQ queries when using the Telerik.Web.UI assembly compilied against the .NET framework and this may cause the unexpected result (if null values are not handled propertly by LINQ).

    Best regards,
    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Terry Webster
    Terry Webster avatar
    48 posts
    Member since:
    Aug 2003

    Posted 04 Aug 2009 Link to this post

    Yes.  This appears to have corrected the problem.  What are the drawbacks to this implementation?  Will I lose any functionality or performance?  When will this issue be fixed to allow linq expressions?
  7. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 05 Aug 2009 Link to this post

    Hello Terry,

    I am pasting once again the reply I already provided in the support ticket:

    With this property set to false the grid will not use LINQ queries behind the scenes to execute built-in operations like sorting, paging, filtering, etc.

    Unfortunately we cannot commit to a timeframe for a fix because the LINQ itself appears to support operations with null values for dates in a bit different way -see the resources below for details:

    http://social.msdn.microsoft.com/Forums/en-US/linqprojectgeneral/thread/fad48931-3322-4e38-b9f2-80601a325351

    http://forums.asp.net/p/1282116/2453330.aspx

    Once this logic changes, the grid will automatically support them as well.

    Best regards,

    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017