You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Sandun (JIRA)" <ji...@apache.org> on 2014/08/06 04:12:11 UTC

[jira] [Commented] (FLEX-32221) Sorting with non-existing dataField and custom sortCompareFunction

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

Sandun commented on FLEX-32221:
-------------------------------

I am trying this workaround in flex 4.13.0
Copied internal refresh parts to overridden refresh function and also created sortCanBeApplied in the subclass  FixedHierarchicalCollectionView.

However  (Line 1167) in HierarchicalCollectionView you have the following
   // if filter is applied to any collection, only then update the length
        if (needUpdate)
            updateLength();  // length will change after filtering, so update it.
updateLength() is a private function updating private property currentLength

Has anyone tried this workaround in the current flex SDK?






> Sorting with non-existing dataField and custom sortCompareFunction
> ------------------------------------------------------------------
>
>                 Key: FLEX-32221
>                 URL: https://issues.apache.org/jira/browse/FLEX-32221
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Advanced Data Grid
>    Affects Versions: Adobe Flex SDK Previous
>         Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Language Found: English
>            Reporter: Adobe JIRA
>            Assignee: Adobe JIRA
>            Priority: Minor
>             Fix For: Adobe Flex SDK Previous
>
>
> I have written a CustomDataGridColumn which extends AdvancedDataGridColumn. It allows the usage of nested objects in the dataField (e.g. dataField="name.de_DE"). The custom column uses a labelFunction and sortCompareFunction to display the correct value. However, the sorting doesn't work.
> Steps to reproduce:
> 1. Compile the provided test case and debug it.
> 2. Open some nodes in the left ADG and sort a column.
> 3. Open some nodes in the right (custom) ADG and sort a column.
>  
>  Actual Results:
>  The values in the left grid are not sorted even though the column shows the sort arrow. The custom grid on the right side allows sorting.
>  
>  Expected Results:
>  The sorting should always work when a custom sortCompareFunction is used regardless of the existance of the dataField.
>  
>  Workaround (if any):
>  I had to extend the ADG in order to provide a new implementation of HierarchicalCollectionView (FixedHierarchicalCollectionView) in the constructor. Furthermore I had to override refresh() and  copy some parts of internalRefresh() and sortCanBeApplied() into my new class. In sortCanBeApplied() I added a check for a compareFunction (line 82). After those changes the sorting works quite fine.



--
This message was sent by Atlassian JIRA
(v6.2#6252)