[ 
https://issues.apache.org/jira/browse/FLEX-32728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13689252#comment-13689252
 ] 

Robert Bar commented on FLEX-32728:
-----------------------------------

a possible workaround - 

derive a new class from the AdvancedDataGrid and then override the following 
method:

override protected function selectItem(item : IListItemRenderer,
                                                                                
           shiftKey : Boolean, ctrlKey : Boolean,
                                                                                
           transition : Boolean = true) : Boolean
                {
                        // if it's a "shift" selection, we have to provide a 
missing anchor:
                        if (shiftKey && allowMultipleSelection && 
!anchorBookmark)
                        {
                                var placeHolder : CursorBookmark = 
iterator.bookmark;
                                var index : int = selectedIndex != -1 ? 
selectedIndex : 0;

                                iterator.seek(CursorBookmark.CURRENT, index -
                                                          
indicesToIndex(verticalScrollPosition - offscreenExtraRowsTop, 
horizontalScrollPosition - offscreenExtraColumnsLeft));
                                caretIndex = index;
                                caretBookmark = iterator.bookmark;
                                anchorIndex = index;
                                anchorBookmark = iterator.bookmark;
                                iterator.seek(placeHolder, 0);
                        }

                        return super.selectItem(item, shiftKey, ctrlKey, 
transition);
                }










                
> After selectedIndices was updated, it can not be selected with ShiftKey
> -----------------------------------------------------------------------
>
>                 Key: FLEX-32728
>                 URL: https://issues.apache.org/jira/browse/FLEX-32728
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Advanced Data Grid
>    Affects Versions: Adobe Flex SDK 3.0 (Release)
>         Environment: Affected OS(s): Windows
> Affected OS(s): Windows XP
> Language Found: Japanese
>            Reporter: Adobe JIRA
>            Assignee: Adobe JIRA
>            Priority: Minor
>
> Steps to reproduce:
> 1. run the attached source
> 2. click "update indices" button
> 3. click a row with shift-key
>  
>  Actual Results:
>  it can't be selected
>  
>  Expected Results:
>  it should be selected
>  
>  Workaround (if any):

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to