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

split date time

1 Answer 114 Views
Grid
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 19 Dec 2011, 04:45 AM
I have a column that displays the date and time the recorded was entered.  I would like to be able to put the date and time in the same column with the date on top and the time underneath.  I would also like to have the end usser sort when they click the header, is this posible?
Thanks.

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 19 Dec 2011, 08:02 AM
Hello,

Try setting DataFormatString as shown below.
ASPX:
<telerik:GridBoundColumn DataField="BirthDate" DataType="System.DateTime" HeaderText="BirthDate" SortExpression="BirthDate" UniqueName="BirthDate" DataFormatString="{0:d}</br>{0:T}">
</telerik:GridBoundColumn>

For sorting you can set AllowSorting as true.

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