View Full Version : How to specify sort asDate in grid column?

16 Sep 2009, 9:41 AM
In reviewing the docs, I see there is a Ext.data.sortType, but I don't know how to apply that to a Grid Column. It seems that by default, a column that has a date value, is sorted as if it were a regular string, thus sorting the dates incorrectly.

I tried adding sortType: 'asDate' in the column definition, but doesn't seem to have any affect.

My grid is using a JsonStore, if that makes any difference.

16 Sep 2009, 11:38 AM
It must actually be a Date.

Didn't Condor show you how to do that?

16 Sep 2009, 12:04 PM
I don't think Condor ever showed me. But, I'm using a renderer in order to format it correctly. Are you saying the underlying value has to be a date, or the rendered value? If the underlying value, I'm not sure how to do that because it is is a string output from a Json feed from a .NET web service, so I'm not sure when/where/how to convert it to an actual date value. It comes across from the web service as a string as: "9/09/2009 11:23 AM"

16 Sep 2009, 9:45 PM