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

[Solved] DateTime in RadGridView

3 Answers 155 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
itlk
Top achievements
Rank 1
itlk asked on 27 Sep 2010, 04:41 PM

Hi,
I would like to ask how can I display the Date/Time data?  I was following Telerik examples, and used GridViewDataColumn. When I set up “DataType” property to “System.DateTime” I get an error message: “Property ‘DataType does not support String to Value conversion.”

 

This error message appears instantly when I enter the System.DateTime in Columns property editor.

 

What am I missing?

 

Thank you for help,
Lubomir

 

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 27 Sep 2010, 05:58 PM
Hello itlk,

There should be no reason for you not to be able to set a DateTime Property for a particular column. You may take a look at our demo and in our online documentation for an example. 
If you have any further difficulties, please provide more details about your application, so that I could suggest an appropriate solution.

All the best,
Maya
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
itlk
Top achievements
Rank 1
answered on 28 Sep 2010, 06:42 AM
Hi Maya,
Here are steps to reproduce the problem:

1. create new Silverlight project
2. add RadGridView
3. in XAML add a new column "test"
4. click on the RadGridView
5. in Visual Studio, in a Properties View, click on Columns to open 'Collection Editor: Columns'
6  in the collection editor only GridViewDataColumn type is available (see my post in Visual Studio Extensions thread). No Telerik predefined columns are offered by the Visual Studio.
7  on the right side in the Collection Editor select DataType row and enter System.DateTime 
8  press enter
9  the error dialog pops up


Regards,
Lubomir
0
Maya
Telerik team
answered on 30 Sep 2010, 02:43 PM
Hi itlk,

Basically, when you try to edit the DataType Property in such a manner, it is important what is the DataMemberBinding Property set to. For example, if the column is bound to a string property, you cannot change it to DateTime type.
 

Best wishes,
Maya
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
Tags
GridView
Asked by
itlk
Top achievements
Rank 1
Answers by
Maya
Telerik team
itlk
Top achievements
Rank 1
Share this question
or