Created
January 12, 2010 15:49
-
-
Save acotie/275297 to your computer and use it in GitHub Desktop.
DadaGrid sample : data/data.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" styleName="plain" pageTitle="Flex Basicサンプル: ドロップインアイテムレンダラー/アイテムエディタ" creationComplete="getPersonData.send()"> | |
<mx:Script> | |
<![CDATA[ | |
import mx.rpc.events.ResultEvent; | |
import mx.collections.ArrayCollection; | |
import mx.containers.*; | |
[Bindable] | |
private var personList:ArrayCollection; | |
]]> | |
</mx:Script> | |
<mx:HTTPService id="getPersonData" url="data/data.xml" result="personList=getPersonData.lastResult.personalData.person" /> | |
<mx:Panel title="ドロップインアイテムレンダラー/アイテムエディタサンプル" width="75%" paddingTop="10" paddingLeft="10" paddingRight="10" /> | |
<mx:Label width="100%" color="blue" text="評価のアイテムエディタ=NumericStepper、退社のアイテムエディタ=Checkboxm、退社はredererIsEditior=trueです" /> | |
<mx:DataGrid id="dg" width="600" rowCount="5" dataProvider="{personList}" editable="true" height="112" > | |
<mx:columns> | |
<mx:DataGridColumn dataField="section" headerText="部署" width="80" /> | |
<mx:DataGridColumn dataField="name" headerText="名前" width="100" /> | |
<mx:DataGridColumn dataField="ev" headerText="評価" width="100" itemEditor="mx.controls.NumericStepper" editorDataField="value" /> | |
<mx:DataGridColumn dataField="bd" headerText="生年月日" width="150" /> | |
<mx:DataGridColumn dataField="retired" headerText="退社" width="60" itemRenderer="mx.controls.CheckBox" editorDataField="selected" rendererIsEditor="true" /> | |
</mx:columns> | |
</mx:DataGrid> | |
<mx:Form width="300" height="160"> | |
<mx:FormItem label="名前"> | |
<mx:Label text="{dg.selectedItem.name}" /> | |
</mx:FormItem> | |
<mx:FormItem label="生年月日"> | |
<mx:Label text="{dg.selectedItem.bd}" /> | |
</mx:FormItem> | |
<mx:FormItem label="評価"> | |
<mx:Label text="{dg.selectedItem.ev}" /> | |
</mx:FormItem> | |
<mx:FormItem label="部署"> | |
<mx:Label text="{dg.selectedItem.section}" /> | |
</mx:FormItem> | |
<mx:FormItem label="退社"> | |
<mx:Label text="{dg.selectedItem.retired}" /> | |
</mx:FormItem> | |
</mx:Form> | |
</mx:Application> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment