最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Flex4 DataGrid中嵌入RadioButton實現(xiàn)思路及代碼

 更新時間:2014年07月27日 14:41:24   投稿:whsnow  
本節(jié)主要介紹了Flex4 DataGrid中嵌入RadioButton實現(xiàn)思路及代碼,需要的朋友可以參考下
<s:DataGrid id="viewDg" width="100%" height="100%" fontFamily="微軟雅黑" 
horizontalScrollPolicy="off" borderVisible="false" 
dataProvider="{viewList}"> 
<s:columns> 
<s:ArrayList> 
<s:GridColumn width="{wid*0.02}" resizable="false" 
itemRenderer="Module_SchoolView.RadioButtonGridItemRenderer"/> 


<s:GridColumn width="{wid*0.25}" headerText="名稱" dataField="xysj02" resizable="false"/> 

<s:GridColumn width="{wid*0.25}" headerText="地名" dataField="xysj02name" resizable="false"/> 

<s:GridColumn width="{wid*0.35}" headerText="URL" dataField="xysj04" resizable="false"/> 

<s:GridColumn width="{wid*0.13}" headerText="備注" dataField="xysj05" resizable="false"/> 
</s:ArrayList> 
</s:columns> 
</s:DataGrid>

MXML頁面

<?xml version="1.0" encoding="utf-8"?> 
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
xmlns:s="library://ns.adobe.com/flex/spark" 
xmlns:mx="library://ns.adobe.com/flex/mx"> 
<fx:Declarations> 
<!-- 將非可視元素(例如服務(wù)、值對象)放在此處 --> 
</fx:Declarations> 
<fx:Script> 
<![CDATA[ 

//---------------------------------------------------------------------------------------------------------- 

override public function prepare(hasBeenRecycled:Boolean):void 
{ 
super.prepare( hasBeenRecycled ); 

// We make the radio button mimic the selection status of the whole row. 
const selected_items: Vector.<Object> = grid.dataGrid.selectedItems; 

if( null == selected_items ) 
{ 
radio_button.selected = false; 
return; 
} 

if( -1 != selected_items.indexOf( data ) ) 
radio_button.selected = true; 
else 
radio_button.selected = false; 
} 

//---------------------------------------------------------------------------------------------------------- 

]]> 
</fx:Script> 

<!--The radio button is only a visual indicator for whether the row is selected or not. 
The "selected" property of the radio_button will be controlled by the "prepare" function. 
The radio_button should not be allowed any user interaction. Hence disabling it.--> 
<s:RadioButton id="radio_button" 
label="" 
enabled="false" 

horizontalCenter="0" verticalCenter="0" /> 

</s:GridItemRenderer>

相關(guān)文章

最新評論

西藏| 泗阳县| 莲花县| 读书| 寿宁县| 东丰县| 嘉义县| 包头市| 五大连池市| 扎鲁特旗| 远安县| 泰顺县| 股票| 同心县| 江永县| 黔东| 应城市| 绥棱县| 西峡县| 阳西县| 丰台区| 松阳县| 平舆县| 郓城县| 赤水市| 揭东县| 曲阳县| 开封市| 建宁县| 炎陵县| 石渠县| 岫岩| 临西县| 锡林浩特市| 龙海市| 慈溪市| 霸州市| 沁源县| 荔波县| 铜陵市| 海晏县|