Robert Bar created FLEX-33158:
---------------------------------
Summary: addSortField method in the AdvancedDataGridEx works
inconsistently
Key: FLEX-33158
URL: https://issues.apache.org/jira/browse/FLEX-33158
Project: Apache Flex
Issue Type: Bug
Components: ADG:MultiColumnSorting
Affects Versions: Adobe Flex SDK 4.5 (Release)
Reporter: Robert Bar
Priority: Minor
Fix For: Adobe Flex SDK 4.5 (Release)
Please assume you have the ADG instance which has a data provider set to an
ArrayCollection with custom compare function associated with the Sort object.
The Sort object contains some fields, so that the ADG shows many sorting
arrows.
If you ctrl+click header of an unsorted column, then ADG reuses the existing
Sort object and adds the field to the collection, so that your custom
comparison function is still in use. Next, if you click header of another
column, so that only one column is sorted, then as the result, ADG will replace
the custom Sort object with blank Sort object and the custom comparison
function is lost.
Basic workaround:
coll.addEventListener("sortChanged", sortChangedHandler);
private function sortChangedHandler(event : Event) : void
{
if (coll.sort)
coll.sort.compareFunction = myCustomSortFunction;
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira