|
Hi Ben; You can get this to work using the
labelFunction property of the DataGridColumn. <?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.collections.XMLListCollection; [
Bindable ] public
var entries:XML = <rootNode
xmlns="http://site.com/Back/DocMetadata"> <Entry> <CreateDate>5/5/2006
9:56:30 AM</CreateDate> <DocumentType>RPR</DocumentType> </Entry> <Entry> <CreateDate>5/3/2006 3:07:27
PM</CreateDate> <DocumentType>RPR</DocumentType> </Entry> </rootNode>; public
var ns : Namespace = new Namespace(
"http://site.com/Back/DocMetadata" ); public
function LabelFunctionDate( item : Object, column : DataGridColumn ) : String { return
XML( item ).ns::CreateDate[ 0 ].toString(); } public
function LabelFunctionType( item : Object, column : DataGridColumn ) : String { return
XML( item ).ns::DocumentType[ 0 ].toString(); } ]]> </mx:Script> <mx:DataGrid
id="myDataGrid" x="10" y="247"
width="536" height="230" dataProvider="{entries.ns::Entry}"> <mx:columns> <mx:DataGridColumn
headerText="Column 1"
labelFunction="LabelFunctionDate"/> <mx:DataGridColumn
headerText="Column 2"
labelFunction="LabelFunctionType"/> </mx:columns> </mx:DataGrid> </mx:Application> From:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard OK, I have posted several times now about problems
caused by having -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- RE: [flexcoders] Namespace hell Tobias Patton
- [flexcoders] Re: Namespace hell ben.clinkinbeard
- [flexcoders] Re: Namespace hell ben.clinkinbeard

