?
Solved

Flex Data grid format coloum as date

Posted on 2008-10-03
1
Medium Priority
?
10,479 Views
Last Modified: 2012-05-05
I was wondering in the flex data grid how would i format a column MM/DD/YY  
0
Comment
Question by:stargateatlantis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 19

Accepted Solution

by:
Gary Benade earned 2000 total points
ID: 22647607

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >
	<mx:Script>
		<![CDATA[
			import mx.controls.dataGridClasses.DataGridColumn;
			import mx.controls.DataGrid;
			
			[Bindable] private var ds:Array = new Array(
			{theDate: new Date()},
			{theDate: new Date()});
			
			
			private function dateFunc( item:Object, column:DataGridColumn):String
			{
				return df.format( item.theDate);
			}
		]]>
	</mx:Script>
	<mx:DateFormatter id="df" formatString="MM/DD/YY"/>
	<mx:DataGrid x="39" y="10" width="575" height="420" dataProvider="{ds}">
		<mx:columns>
			<mx:DataGridColumn headerText="date" dataField="theDate" labelFunction="dateFunc" />
		</mx:columns>
	</mx:DataGrid>	
</mx:Application>

Open in new window

0

Featured Post

Four New Appliances. Same Industry-leading Speeds.

But don't take it from us.  The Firebox M370 is Miercom tested and Miercom approved, outperforming its competitors for stateless and stateful traffic throughput scenarios.  Learn more about the M370, M470, M570 and M670 and find the right solution for your organization today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question