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

How to set DateTimeColumn format to dd.MM.yyyy ??

1 Answer 570 Views
Grid
This is a migrated thread and some comments may be shown as answers.
anonym
Top achievements
Rank 1
anonym asked on 04 May 2009, 02:54 PM
Hello, i want to print the date in the dd.MM.yyyy Format with GridDateTimeColumn, i have tried the following:

<telerik:GridDateTimeColumn DataField="Expiration" DataType="System.DateTime" UniqueName="Expiration" CurrentFilterFunction="StartsWith"  DataFormatString='<%#Bind("Expiration", "0:dd.MM.yyyy") %>'  />

I get an error because a control with a bi-directional databind must have an ID

Can you help me!
               

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 May 2009, 03:59 AM
Hello,

Try setting the DataFormatString for the DateTimeColumn directly rather than using a syntax as shown below:
aspx:
  <telerik:GridDateTimeColumn DataField="Date" DataFormatString="{0:dd.MM.yyyy}" UniqueName="OrderDate" HeaderText="OrderDate"></telerik:GridDateTimeColumn> 

Thanks
Princy.
Tags
Grid
Asked by
anonym
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or