2 Replies Latest reply on Jun 10, 2010 11:26 PM by BhaskerChari

    double click problem?

    flex_kkm Level 1

      Double click event is not working for Datagrid? How can i solve it?

        • 1. Re: double click problem?
          BhaskerChari Level 4

          Hi flex_kkm,


          You need to fisrt enable doubleClickEnabled="true" on DataGrid. Check the below sample:



          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
             import mx.controls.Alert;
          <mx:ArrayCollection id="arr1" >
             <mx:col1> test1 </mx:col1>
             <mx:col2> price1 </mx:col2>
             <mx:col3> album1 </mx:col3>
             <mx:col1> test2 </mx:col1>
             <mx:col2> price2 </mx:col2>
             <mx:col3> album2 </mx:col3>
          <mx:DataGrid x="23" y="10" dataProvider="{arr1}" doubleClickEnabled="true" doubleClick="Alert.show('Double Click Fired');">
            <mx:DataGridColumn headerText="Column 1" dataField="col1"/>
            <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
            <mx:DataGridColumn headerText="Column 3" dataField="col3"/>

          If this post answers your question or helps, please kindly mark it as such.


          Bhasker Chari

          • 2. Re: double click problem?
            flex_kkm Level 1

            Thanks dude. The answer is very helpful.