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

Date filter column in grid

7 Answers 148 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lubna Ansari
Top achievements
Rank 1
Lubna Ansari asked on 12 Aug 2010, 04:41 PM
Hi,

I've a date column in my filter. If I type any character in filter coulmn it gives me javascript error 'length is null or not an object'. How can stop user to enter any character in date filter column. Below is my code.

 

<telerik:GridDateTimeColumn DataField="Date_Created" HeaderText="Date Created" HeaderStyle-HorizontalAlign="Center" ShowFilterIcon="true"

 

 

SortExpression="Date_Created" UniqueName="Date_Created" PickerType="DatePicker" FilterControlWidth="100px"

 

 

DataFormatString="{0:d}" AutoPostBackOnFilter="true" AllowFiltering="true">

 

 

<HeaderStyle HorizontalAlign="Center" />

 

 

</telerik:GridDateTimeColumn>

 



Regards,
Lubna.

7 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 13 Aug 2010, 04:43 PM
Hello Lubna,

Can you verify that you are using latest 2010.2.713 version of RadControls for ASP.NET AJAX in your project?

Best wishes,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Lubna Ansari
Top achievements
Rank 1
answered on 16 Aug 2010, 09:22 AM
Hi Pavlina ,
I'm using 2010.1.309.20 version.

Regards,
Lubna.
0
Pavlina
Telerik team
answered on 18 Aug 2010, 04:22 PM
Hello Lubna,

The provided information is not enough for me to determine the reason for the problem, but I recommend you to compare your code with the one used in this online demo and let me know if it helps to avoid this error.

Best wishes,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Rory
Top achievements
Rank 1
answered on 09 Mar 2011, 02:33 AM
I'm getting this error when using the R. Click Grid Filter Menu and a non date format is entered. Is there a way to validate these controls?
"Line: 6
Error: Sys.WebForms.PageRequestManagerServerErrorException: String was not recognized as a valid DateTime"
0
Pavlina
Telerik team
answered on 09 Mar 2011, 03:12 PM
Hi Rory,

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

Greetings,
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
Rory
Top achievements
Rank 1
answered on 09 Mar 2011, 05:51 PM
Hi Pavlina,
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:07 PM
Hi Rory,

At this point, if the problem persists, it would be best if you open a formal support ticket and send us a sample runnable version of your project, so we can debug it locally and find out what causes the error in your scenario.

Thank you.

Greetings,
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!
Tags
Grid
Asked by
Lubna Ansari
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Lubna Ansari
Top achievements
Rank 1
Rory
Top achievements
Rank 1
Share this question
or