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

Telerik Rad Grid Date Time Column.

2 Answers 293 Views
Grid
This is a migrated thread and some comments may be shown as answers.
L. M. Pathan
Top achievements
Rank 1
L. M. Pathan asked on 09 May 2011, 11:20 AM
Dear Telerik Team,

I am using Telerik Rad Grid with GridDateTimeColumn. Please find below code pasted for reference. When this column as empty values and if user filters this date column it shows an error in IE. Also when user adds string like "test" in date picker in filterbar then nothing happens. Please also find the error message below.

Code:
<telerik:GridDateTimeColumn DataField="dtmTermDate" HeaderText="Termination Date" DataFormatString="{0:MM/dd/yyyy}"
SortExpression="dtmTermDate" UniqueName="dtmTermDate" HeaderTooltip="Termination Date" PickerType="DatePicker" ShowFilterIcon="true" ConvertEmptyStringToNull="true">
</telerik:GridDateTimeColumn>


Error in IE: 

Message: Sys.WebForms.PageRequestManagerServerErrorException: Specified cast is not valid.
Line: 4723
Char: 21
Code: 0
URI: http://localhost/Test/ScriptResource.axd?d=6gQs4Ep8lZdvCRTPnRQh8ewwwsj0oRdqcYcj0780GUlE7uHPItLaQBPSqRnOCJ6nFZOBafLdJr9TM4kY6q2ceFVLqoVgM5Nu1uJkbrcLvcU1&t=ffffffffec2d9970

Please help. Thank you.

Regards

Pathan L.

2 Answers, 1 is accepted

Sort by
0
L. M. Pathan
Top achievements
Rank 1
answered on 09 May 2011, 02:32 PM
Hello Telerik Team,

Please advise on GridDateTimeColumn filter with null values.

When I  filter for this date colum, it's works perfectly if all records have information, but if a record contains NULL I get the following error:

Message: Sys.WebForms.PageRequestManagerServerErrorException: Specified cast is not valid.
Line: 4723
Char: 21
Code: 0

How or where I can specify in the filter that this column may contain null or date and work it.

This is third time I am posting for the same issue and trying to resolve it for last 3 days but no luck? Can anybody please help???

Thank you.

Pathan L. M.

0
L. M. Pathan
Top achievements
Rank 1
answered on 09 May 2011, 03:48 PM
Hello Everyone,

Setting the EnableLinqExpressions property of the RadGrid to false resolved the issue. Thank you.


Regards,

Pathan L. M
Tags
Grid
Asked by
L. M. Pathan
Top achievements
Rank 1
Answers by
L. M. Pathan
Top achievements
Rank 1
Share this question
or