目次 |
---|
・DataGridとは ・ソース ・サンプル |
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" viewSourceURL="http://www.confrage.com/flex/DataGrid.txt"> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; [Bindable] private var dspData:ArrayCollection = new ArrayCollection( [ { col1:"行 1 - 列 1", col2:"行 1 - 列 2", col3:"行 1 - 列 3" }, { col1:"行 2 - 列 1", col2:"行 2 - 列 2", col3:"行 2 - 列 3" }, { col1:"行 3 - 列 1", col2:"行 3 - 列 2", col3:"行 3 - 列 3" } ] ); ]]> </mx:Script> <mx:DataGrid dataProvider="{dspData}"> <mx:columns> <mx:DataGridColumn headerText="列 1" dataField="col1" /> <mx:DataGridColumn headerText="列 2" dataField="col2" /> <mx:DataGridColumn headerText="列 3" dataField="col3" /> </mx:columns> </mx:DataGrid> </mx:Application>