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

Operator '>=' incompatible with operand types 'Object' and 'DateTime'

3 Answers 310 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Moustafa
Top achievements
Rank 1
Moustafa asked on 05 Sep 2008, 10:57 AM
Hi Telerik

I create custom date filter column that was working very good until 2007- Q3 .
This custom date picker do the between comparison  for the date type.

when  I upgraded to 2008 - Q2 [rad controls for asp.net Ajax]  I'm tried to filter the grid using my custom fiter it give me an exception

"Operator '>=' incompatible with operand types 'Object' and 'DateTime'"

at this line of code

filterItem.FireCommandEvent(

"Filter", new Pair("Between", this.UniqueName));

I searched the internet and found that this problem raised becuase of LINQ

Please provide me with  the solution as quik as possible

thanks




3 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 08 Sep 2008, 01:23 PM
Hello Moustafa,

Can you please check whether setting the EnableLinqExpressions property of the RadGrid instance to false addressed the error you receive? Thus you will force the grid to use the old filter expression comparison and everything should be fine with your Classic implementation.

Kind regards,
Stephen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Moustafa
Top achievements
Rank 1
answered on 09 Sep 2008, 06:54 AM
yes this solve the problem, but what you mean by "your Classic implementation"

Is there any other solutions for date filter for the Between operator??

0
Accepted
Sebastian
Telerik team
answered on 09 Sep 2008, 08:40 AM
Hi Moustafa,

By 'Classic implementation' I meant the solution posted previously for the Classic version of our components (RadControls for ASP.NET).

Best regards,
Stephen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Calendar
Asked by
Moustafa
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Moustafa
Top achievements
Rank 1
Share this question
or