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

  • SEARCH
  • Home
  • 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 8103421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:32:42+00:00 2026-06-05T23:32:42+00:00

I am enabling multiple row selection with clicking checkbox Item renderer. this works for

  • 0

I am enabling multiple row selection with clicking checkbox Item renderer.

this works for extending mx:Datagrid (other answer)

override protected function selectItem(item:IListItemRenderer,
                                                   shiftKey:Boolean, ctrlKey:Boolean,
                                                   transition:Boolean = true):Boolean
            {
                // only run selection code if a checkbox was hit and always
                // pretend we're using ctrl selection

                if (item is CheckBox)
                    return super.selectItem(item, shiftKey, true, transition);
                else //Avenir Cokaj 23/06/11: this enables the flex's natural selection
                    return super.selectItem(item, shiftKey, ctrlKey, transition);

            }

But there is no super.selectItem in s:Datagrid So how to enable control key on spark datagrid?

  • 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-05T23:32:43+00:00Added an answer on June 5, 2026 at 11:32 pm

    Use the selectionMode property. No more subclassing required. In your case, you would want to set it to multipleRows.

    <s:DataGrid selectionMode="multipleRows" />
    

    Other values are:

    • none
    • singleCell
    • singleRow (default)
    • multipleCells

    I believe they are pretty self-explanatory.

    Now if you wish the rows to be multi-selected with a single click (as if the control key were constantly pressed), you can do this by subclassing DataGrid like this:

    public class MyDataGrid extends DataGrid {
    
        override protected function grid_mouseDownHandler(event:GridEvent):void {
            event.ctrlKey = true;
            super.grid_mouseDownHandler(event);
        }
    
    }
    

    We just intercept the event and set its ctrlKey property to always be true.

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

Sidebar

Related Questions

Hi I have setup multiple application in Kohana v3, it works normally without enabling
I have read that for enabling the auto return I have to enable this
Is there a way of enabling a long strings to be put onto multiple
My problem is enabling a checkbox in javascript but in disabling my codes is
I am enabling jQuery DataTable Plugin like this and it is working: $('#MyList').dataTable( {
I asked this question previously: Disabling and Re-Enabling Dynamic Form Elements with JQuery but
What are some best practices on enabling a web application to support multiple resolutions?
I want my PowerShell script to print something like this: Enabling feature XYZ......Done The
After enabling the ruby plugin in WebStorm it starts with the folowing error message:
Does enabling the configuration option with-config-file-scan-dir when compiling PHP lead to performance issues? Specifically,

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.