DataGrid学习1


  任务1:程序实现对dataGrid的某列进行排序操作。
  让DataGrid发送一个HeaderRelease事件,就可以实现  // 用于点击按钮实现对datagrid的重新排序 protected function btnSort_clickHandler(event:MouseEvent):void { var dge:DataGridEvent = new DataGridEvent(DataGridEvent.HEADER_RELEASE, false, true, 0, null, 0, null, null, 0); dgTest1.dispatchEvent(dge); } 。。。  任务2:DataGrid中加入CheckBox,某列为DropDownList,并且在点击时才显示ddl。
  其中一个问题是,需要点击时,直接下拉DropDownList,搞了好几天,最后找到方法为openDropDown。  flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" focusEnabled="true" creationComplete="mxdatagriditemrenderer1_creation CompleteHandler(event)">    width="100%" selectedIndex="{data.State=='Delete'? 0 : 1}" change="ddl_changeHandler(event)">      ---------------------------------------  flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="application1_creationCompleteHan dler(event)">                                    width="236" height="198" click="taInfo_clickHandler(event)"/>                   

你可能感兴趣的:(datagrid)