Skip to main content
WebolutionDesigns
Known Participant
November 2, 2011
Answered

CFGRID Sort Time

  • November 2, 2011
  • 1 reply
  • 1393 views

Has anyone ever been able to sort times appropriately in a CFGRID? I cannot seem to Google anything that is helpful.

~Clay

This topic has been closed for replies.
Correct answer insuractive

Can you please point me in the right direction? Are there docs anywhere? I have been playing with JQuery and the tablesorter plugin using a custom parser, but running into some difficulties with that.


We've had a lot of luck with the jQuery Data Tables plug in: http://datatables.net/

It supports a very extensible sorting system: http://datatables.net/release-datatables/examples/basic_init/multi_col_sort.html

It does require a certain familiarity with jQuery.  The adobe forum post that I included suggested using a datetime stamp from the database instead of the formatted time string may work in CFGrid.

1 reply

WebolutionDesigns
Known Participant
November 3, 2011

Basically it is sorting them as follows...

9:30

5:00

4:00

10:00

So it seems to be sorting them via digits and not as time should be sorted. Anyone run into this before?

Inspiring
November 3, 2011

I'm not sure that there is a built in way to sort based on time value using CFGrid, but you could always extend the underlying grid system (I think it uses Ext-js) to add a sort mask column that convets the time into an integer (removing the colon ":") and use a sorting function to override the sorting on that field.

Inspiring
November 3, 2011