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 6957557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:01:07+00:00 2026-05-27T15:01:07+00:00

I have a spark datagrid on a mobile application, I set the interactionMode=touch and

  • 0

I have a spark datagrid on a mobile application, I set the

interactionMode="touch"

and the dataGrid scrolling is good, I got some problems adding a selectionChange eventListener to it, because scrolling the dataGrid will automatically change the selection and instead simply scrolling it, the function binded will start…

How can I add the touch dalay before select the index, so if I scroll the grid the selection won’t change, and it change only if I press the item without scrolling?

  • 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-05-27T15:01:08+00:00Added an answer on May 27, 2026 at 3:01 pm

    I solved using a workaround….

    Instead adding the selectionChange eventListener, I used the mouseUp and mouseDown to check the time between click and release, and if the release time is less than click plus some dalay, I return the selection otherwise not…

    <s:DataGrid id="grigliaData"
       sortableColumns="false"
       rowHeight="100"
       interactionMode="touch"
       mouseDown="grigliaData_mouseDownHandler(event)"
       mouseUp="grigliaData_mouseUpHandler(event)"
       top="230" left="5" right="5" bottom="50"
       dataProvider="{listaEventi}" width="100%" height="100%"> 
    
      //AS Code 
            private var _lastClickEvent:int;
            protected function grigliaData_mouseDownHandler(event:MouseEvent):void
            {
                _lastClickEvent = getTimer();
            }
    
            protected function grigliaData_mouseUpHandler(event:MouseEvent):void
            {
                if (getTimer() < _lastClickEvent + 200) // 200 = Dalay
                {
                                   // return selectedIndex
                }
            }
    

    EDIT:
    I also added the check on mouseX and mouseY position, now the grid dispatch the selectionChange if the time before release and the change of position is less that the default dalay (time/pixel)…

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

Sidebar

Related Questions

i have used spark datagrid for my mobile application . my problem is last
Some body tried Spark View Engine with asp.net mvc 2 preview 2? I have
I have a custom skin applied to a Flex 4 spark datagrid. One really
I have a spark group with layout set to horizontal. The group contains a
I use Spark View Engine with nested master pages. I have Application.spark which defines
I am writing a flex application and I have two Spark TextAreas. I want
I have a BorderContainer with some instances of spark Line. I need to select
I have the Spark scroll bar in my application skinned the way I want
I have a spark TabBar and I want to hide and show some elements
In my Flex (Flash Builder 4) Air application, I have a spark window ,

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.