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

Filtering IsNull on DateTimeColumn

5 Answers 123 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Terry Webster
Top achievements
Rank 2
Terry Webster asked on 30 Jul 2009, 02:52 PM
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

5 Answers, 1 is accepted

Sort by
0
Terry Webster
Top achievements
Rank 2
answered on 30 Jul 2009, 07:39 PM
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?
0
Terry Webster
Top achievements
Rank 2
answered on 31 Jul 2009, 08:09 PM
Is there anyone out here that is experiencing the same issue?  If so, has there been a resolution?

Need help on this one...
0
Sebastian
Telerik team
answered on 04 Aug 2009, 02:00 PM
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.
0
Terry Webster
Top achievements
Rank 2
answered on 04 Aug 2009, 03:16 PM
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?
0
Sebastian
Telerik team
answered on 05 Aug 2009, 08:32 AM

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.
Tags
Grid
Asked by
Terry Webster
Top achievements
Rank 2
Answers by
Terry Webster
Top achievements
Rank 2
Sebastian
Telerik team
Share this question
or