|
Flexcoders, Is there any way to assign the DataGridColumns dynamically? Instead of hardcoding each of the DataGridColumn, I would like to dynamically create an Array of them using the 'mydata' ArrayCollection. --------------------------------------------------------------------------------- var mydata:ArrayCollection = new ArrayCollection(myservice.result.data.row); <mx:DataGrid id="zndg" width="100%" height="100%" dataProvider="{mydata}"> <mx:columns> <mx:Array> <mx:DataGridColumn columnName="EMPNO" /> <mx:DataGridColumn columnName="ENAME" /> </mx:Array> </mx:columns> </mx:DataGrid> --------------------------------------------------------------------------------- In the example below the "myservice.result.data.row" is an XML structure:: <row> <EMPNO>346546</EMPNO> <ENAME>John Roberts</ENAME> </row> <row> <EMPNO>346546</EMPNO> <ENAME>John Roberts</ENAME> </row> -- 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
|
- [flexcoders] Dynamic DataGridColumns Hari Kolasani
- Re: [flexcoders] Dynamic DataGridColumns Anatole Tartakovsky
- Re: [flexcoders] Dynamic DataGridColumns Hari Kolasani

