Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7726739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:17:29+00:00 2026-06-01T05:17:29+00:00

I want to listen both click and double click events for advanced data grid

  • 0

I want to listen both click and double click events for advanced data grid in flex. I have given double click enabled true and written the function in itemdoubleclick but only click is working but not itemdoubleclick.Can any one please help me.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:17:31+00:00Added an answer on June 1, 2026 at 5:17 am

    You probably did the right thing but the datagrid do not handle very well the click and double click, you can use a workaround to do that:

    first the datagrid properties:

    <s:DataGrid 
        dataProvider="{lista}"
        click="click(event)"        
        doubleClickEnabled="true"       
        doubleClick="doubleClick(event)">
    

    then the click handler start a timer and if the timer successfully terminate the single click event is dispatched, otherwise if you double click the timer is stopped and you handle the double click event…

    An example is better than anything else…

    // A timer used to check if is a single or doubleclick
    private var t:Timer;
    protected function click(event:MouseEvent):void
    { // on single click you start a timer, the dalay 
      // is 500 but you can set what you prefer             
        t = new Timer(500,1);
        t.addEventListener(TimerEvent.TIMER_COMPLETE, singleClick);
        t.start();
    }
    
    protected function singleClick(e:TimerEvent):void
    {
      // if the timer complete correctly this method is called and 
      // here you manage the single click event 
        t.removeEventListener(TimerEvent.TIMER_COMPLETE,singleClick);
        trace("single click");              
    }
    
    protected function doubleClick(event:MouseEvent):void
    {
      // on double click you remove the timer event listener and you stop it if it's running
      // here you manage the double click event...       
        t.removeEventListener(TimerEvent.TIMER_COMPLETE,singleClick);
        if (t.running)
            t.stop();
          trace("double click");
    }
    

    Hope this helps…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Oracle Connection to a ORACLE 10.2 database and want to listen
Can I listen to Alert button click between components using AsyncToken? Basically, I want
I want to listen to all notifications dispatched to the defaultCenter. Both public and
i want to have both an Apache and a Game Server to be reachable
Assume that I want to listen to a non-common port (9090 for example) 24/7
I want my BHO to listen to onmousedown event of some element in a
want to have a Hyperlink-Button in a gridView in which I can display a
The setup: I have a singleton data access manager object, call it Manager. I
I want to listen for connection/disconnection with a number of specific bluetooth devices whose
I want to listen to SSDP multicasts on port 1900. The port is already

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.