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

Problem sorting datetime column

1 Answer 64 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 11 Sep 2009, 01:42 PM
Hello again,

I've got two more issues

1)
When I bind the radgridview to a linq to sql datacontext and do sorting on a datetime column, then I get the following error:

SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

2) In your demo application, under DataSourceUpdates, there goes something wrong in my opinion.
When you edit a textbox, the binding with the gridview.CurrentItem doesn't function anymore. Also after resetting the form, the text won't disappear. I think this has something to do with the oneway binding. I solved the problem by using the selectionchanged event instead of binding the textboxes to the CurrentItem

With kind regards,
Thomas


1 Answer, 1 is accepted

Sort by
0
Stefan Dobrev
Telerik team
answered on 14 Sep 2009, 02:41 PM
Hello Thomas,

Thanks for sharing your feedback with us. Please find my answers in order:
  1. We are aware of this bug with non-nullable date time columns when GridView is bound to Linq2Sql or EF data sources. We will try to eliminated this problem in a future version of the control. Meanwhile I can suggest you a simple work-around. Using the VS designer you can make the date time field in your Linq2Sql classes to be nullable. I'm attaching a screenshot with the required steps for your convenience.
  2. We will update this example to accommodate the required change.

Thanks again for suggestions and bug report. I have updated your Telerik points.

All the best,
Stefan Dobrev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Thomas
Top achievements
Rank 1
Answers by
Stefan Dobrev
Telerik team
Share this question
or