Skip navigation
Currently Being Moderated

Native event

Jan 27, 2012 1:12 AM

I have created AdvancedDataGrid in flex 4.5.1. under WindowedApplication.I want to handle nativeDragStart event but it gives error as--


TypeError: Error #1034: Type Coercion failed: cannot convert to



          at mx.core::UIComponent/dispatchEvent()[E:\dev\4.5.1\frameworks\projects \framework\src\mx\core\]

          at mx.managers::NativeDragManagerImpl/_dispatchDragEvent()[C:\autobuild\ galaga\frameworks\projects\airframework\src\mx\managers\NativeDragMana]

          at mx.managers::NativeDragManagerImpl/nativeDragEventHandler()[C:\autobu ild\galaga\frameworks\projects\airframework\src\mx\managers\NativeDrag]


I have used following code--


<?xml version="1.0" encoding="utf-8"?>

<!-- erent-flex-datagrid-controls/ -->

<mx:WindowedApplication xmlns:mx=""







                                   import mx.controls.Alert;

                         protected function adg1_nativeDragStartHandler(event:NativeDragEvent):void


                                                      // TODO Auto-generated method stub

                                             "Native Event Handler");





               <mx:ArrayCollection id="arr">

                         <mx:Object colA="Item A.0" colB="Item B.0" colC="Item C.0" />

                         <mx:Object colA="Item A.1" colB="Item B.1" colC="Item C.1" />

                         <mx:Object colA="Item A.2" colB="Item B.2" colC="Item C.2" />

                         <mx:Object colA="Item A.3" colB="Item B.3" colC="Item C.3" />

                         <mx:Object colA="Item A.4" colB="Item B.4" colC="Item C.4" />

                         <mx:Object colA="Item A.5" colB="Item B.5" colC="Item C.5" />

                         <mx:Object colA="Item A.6" colB="Item B.6" colC="Item C.6" />

                         <mx:Object colA="Item A.7" colB="Item B.7" colC="Item C.7" />

                         <mx:Object colA="Item A.8" colB="Item B.8" colC="Item C.8" />

                         <mx:Object colA="Item A.9" colB="Item B.9" colC="Item C.9" />


          <mx:AdvancedDataGrid id="adg1" designViewDataType="tree" dataProvider="{arr}" dragEnabled="true" dropEnabled="true" nativeDragStart="adg1_nativeDragStartHandler(event)">


                                        <mx:AdvancedDataGridColumn dataField="colA" headerText="Column 1"/>

                                        <mx:AdvancedDataGridColumn dataField="colA" headerText="Column 2"/>

                                       <mx:AdvancedDataGridColumn dataField="colA" headerText="Column 3"/>






someone please help me.


More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points