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

[Solved] DateFormat problem

4 Answers 124 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.
GOURVEZ JJ
Top achievements
Rank 1
GOURVEZ JJ asked on 12 Jan 2012, 11:48 AM
Hi,

I use radgrirview in an application.
I have same code that example "GridView Edit Template".
Bu I have an problem.

When I choose an date, radgridview dysplay date and time (00:00:00)

Does it possible do not dysplay time ?

Thanks

4 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 12 Jan 2012, 01:15 PM
Hello,

How have you defined your CellEditTemplate? You could set a string format to show what you need. For example for the GridViewDataColumn this would look like so:
<telerik:GridViewDataColumn DataMemberBinding="{Binding DateEstablished}" DataFormatString="{}{0:yyyy/mm/dd}">


Greetings,
Didie
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
GOURVEZ JJ
Top achievements
Rank 1
answered on 12 Jan 2012, 03:45 PM
Thanks it's perfect, I changed variable type (string to DateTime) and add dataFormatString

0
Raja
Top achievements
Rank 1
answered on 21 Feb 2013, 04:34 AM
How to make the DataFormatString="{}{0:yyyy/mm/dd}"
work for autogenerated columns for datetime? 
0
Vlad
Telerik team
answered on 21 Feb 2013, 06:49 AM
Hello,

 You can set desired property for desired column using AutoGeneratingColumn event.

Regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
GOURVEZ JJ
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
GOURVEZ JJ
Top achievements
Rank 1
Raja
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or