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

Grid Filter Menu for GridBoundColumn with a DateTime source

5 Answers 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rory
Top achievements
Rank 1
Rory asked on 09 Mar 2011, 03:02 AM
Hello,
We have a Grid Filter Menu on a GridBoundColumn with a data type of DateTime coming from the DataSet. The Filter Menu tries to use a DateFormat when filtering and we get this error if we don't enter the correct date format.

 "Line: 6
Error: Sys.WebForms.PageRequestManagerServerErrorException: String was not recognized as a valid DateTime."

We also have some GridBoundColumns that have a data type of boolean. When we use their filter menu both a checkbox and a textbox is displayed. The textbox is useless.

We realize that one fix is to just change the columns to GridDateTime and GridCheckBox but we are hesitating with this fix because it is a big change to our application and we are worried that these other column types will have more overhead than gridboundcolumn and will end up slowing performace. Please advise us.
Thanks.

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 09 Mar 2011, 10:15 AM
Hello Rory,

Try to set  the EnableLinqExpressions of the grid to false and check whether it resolves the error.

ASPX:
<telerik:RadGrid ID="RadGrid1" runat="server"  AllowFilteringByColumn="true"
 EnableLinqExpressions="false">

Thanks,
Princy.
0
Rory
Top achievements
Rank 1
answered on 09 Mar 2011, 05:50 PM
Hi Princy,
Thanks for the advise but unfortunately that doesn't fix the bug. The error isn't related to LINQ it is coming from the the Filter that is trying to convert the filter string into a DateTime field without providing any sort of validation. This is a bug in Telerik's grid filter control because it allows a GridBoundColumn to be bound with a DateTime type that can apply DateTime filters.
0
Pavlina
Telerik team
answered on 14 Mar 2011, 04:19 PM
Hello Rory,

I've just answered to the other forum ticket regarding this question. Can we continue our communication there?

Thank you.

All the best,
Pavlina
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Velu
Top achievements
Rank 1
answered on 03 Nov 2014, 09:50 PM
Hi Pavlina,

I have the same issue. Could you share the other posts' link you're talking about here?

Thanks
0
Pavlina
Telerik team
answered on 04 Nov 2014, 09:38 AM
Hi,

In the other post I asked for a sample runnable version of the project where this problem can be observed.
However, can you please verify that your DataField is of System.DateTime type. Does filtering works as expected when you use this field with a GridDateTimeColumn instead of GridBoundColumn? Also make sure that the same problem persists with the latest version of UI controls for ASP.NET AJAX.

Regards,
Pavlina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Rory
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Rory
Top achievements
Rank 1
Pavlina
Telerik team
Velu
Top achievements
Rank 1
Share this question
or