Any help on this?

Thanks
--- In [email protected], "vkc_nair" <[EMAIL PROTECTED]> wrote:
>
> Hi All,
> 
> I'm having problem with DataGrid sort by date column. 
> 
> 
> My date value in the XML file is as ="Mon Apr 03 15:18:59 PDT 
2006". 
> 
> 
> Put the value on DataGrid  like 
> 
> 
>  <mx:DataGridColumn dataField="prechecked" headerText="Prechecked" 
> sortCompareFunction="date_sortCompareFunc" /> 
> 
> 
> I have a date compare function as 
> 
> 
> private function date_sortCompareFunc(itemA:Object, 
> itemB:Object):int 
> { 
> 
> 
>                 var dateA:Date = new 
> Date(Date.parse(itemA.prechecked)); 
>                 var dateB:Date = new 
> Date(Date.parse(itemB.prechecked)); 
>                 return ObjectUtil.dateCompare(dateA, dateB); 
>             } 
> 
> 
> Sitll I'm not able to get the data sorted correct. What's wrong? 
> 
> 
> Any help? 
> 
> 
> Thanks
>


Reply via email to