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

Customize Date Formatting (Relative Time) for Grid Column

1 Answer 34 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marlon
Top achievements
Rank 1
Marlon asked on 30 Jun 2015, 12:39 PM
I'd like to switch a column of a grid to display a more human readable relative time string (similar to moment.js's fromNow() method) but I'd also like the column to still be sortable based the actual date object. How can I accomplish this?

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 02 Jul 2015, 07:42 AM

Hello Marlon,

 

Customizing the format of the value displayed in the column could be achieve by using columns.format. This is only visual modification on how the values will be displayed in the columns, so the actual data remains the same. Given this sorting functionality should work against the actual date object.  

 

 

Regards,
Boyan Dimitrov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Marlon
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or