I have a Datagrid that gets its data from an ArrayCollection of model "beans". The ArrayCollection Outcomes is a list of Outcome
<s:DataGrid dataProvider="{outcomes}">
<s:columns>
<s:ArrayList>
<s:GridColumn dataField="outcome" headerText="Outcome" width="120"/>
<s:GridColumn dataField="dateRequired" headerText="Date Req" width="130"/>
</s:ArrayList>
</s:columns>
</s:DataGrid>
Outcome.as
[Bindable]
public class ASPersonalOutcomeSummary {
public var _outcome:String;
public var _dateRequired:Number;
}
The problem is that dateRequired is represented as a Number, this design decision was made so it makes it easier to pass between the AS client and Java backend.
I really want to display this number as a Date String (eg. 1 Feb 2011 or something like that) but as it is a number, it simply displays as the timestamp in the datagrid... eg.
Outcomes | Date Required
blahhhhhh | 12389712987
blahhhhh2 | 13242342349
Any ideas?