2 Replies Latest reply on Jan 28, 2011 9:41 AM by peteandrus

    Disable doubleclick on DataGridColumn

    Daniel Gerep

      Hi guys,

       

       

      I have a DataGrid with a function on DoubleClick that calls a new window with detailed information about the item.

       

      The problem is that I have a NumericSteper in one of my column so the user can increase the value but when the user click on it twice, it opens the window.

       

      What kind of event do I have to send to my function to check if the doubleclick is not that specific column?

       

      Thanks in advance for any help.

        • 1. Re: Disable doubleclick on DataGridColumn
          Daniel Gerep Level 1

          I found the solution

           

          private function doubleClick_handler(event:ListEvent):void

          {

           

               var column:String = dataGrid.columns[event.columnIndex].dataField;


               if(column!='column_name')

               {

                    execute something
               }

           

          }

           

           

          On my DataGrid instead of doubleclick I used itemdoubleclick, problem solved =)

           

          Hope that helps someone.

          • 2. Re: Disable doubleclick on DataGridColumn
            peteandrus Level 1

            i'm not sure if this would work, but you MIGHT want to try:

             

            if(event.currentTarget!=NumericStepper) or something like that.

             

            otherwise, if the user tries to click outside the stepper in order to open more info, but is still TECHNICALLY in that column, nothing will happen and you'll get a bunch of unpleasant phone calls!