校园春色亚洲色图_亚洲视频分类_中文字幕精品一区二区精品_麻豆一区区三区四区产品精品蜜桃

主頁 > 知識庫 > Flex4 DataGrid中嵌入RadioButton實現思路及代碼

Flex4 DataGrid中嵌入RadioButton實現思路及代碼

熱門標簽:什么行業需要電話機器人 天津企業外呼系統代理商 地圖標注多家店 南昌crm外呼系統如何 中山外呼系統中間件 車載電話機器人 廣州ai外呼系統業務 外呼系統號碼顯示 無錫電銷外呼系統代理
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> 
!-- 將非可視元素(例如服務、值對象)放在此處 --> 
/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>
您可能感興趣的文章:
  • Flex 獲取每月第幾周小例子
  • Flex 遍歷Object鍵和值的示例代碼
  • Flex DataGrid 偽合并單元格實現思路
  • Flex 自定義DataGrid實現根據條目某一屬性值改變背景顏色
  • flex 遍歷Object對象內容的實現代碼
  • 全面了解flex的用途

標簽:攀枝花 呂梁 佛山 滄州 泰州 仙桃 欽州 海西

巨人網絡通訊聲明:本文標題《Flex4 DataGrid中嵌入RadioButton實現思路及代碼》,本文關鍵詞  Flex4,DataGrid,中,嵌入,RadioButton,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《Flex4 DataGrid中嵌入RadioButton實現思路及代碼》相關的同類信息!
  • 本頁收集關于Flex4 DataGrid中嵌入RadioButton實現思路及代碼的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 新丰县| 尼木县| 淮滨县| 郎溪县| 南乐县| 弥渡县| 灵川县| 含山县| 婺源县| 钟祥市| 永济市| 文化| 南漳县| 大新县| 张掖市| 景宁| 皋兰县| 绵阳市| 北京市| 阿图什市| 靖安县| 武山县| 鄂伦春自治旗| 邯郸市| 长丰县| 江山市| 从化市| 页游| 峨边| 宁南县| 田林县| 旅游| 凤翔县| 威海市| 台江县| 万盛区| 黄平县| 永善县| 军事| 安新县| 福州市|