Author: cframpton
Date: Tue Nov 27 18:21:07 2012
New Revision: 1414303

URL: http://svn.apache.org/viewvc?rev=1414303&view=rev
Log:
FLEX-33272.  RTE occurred while trying to hide columns of an AdvancedDataGrid 
having lockedColumnCount greater than 0 that was scrolled all the way over to 
the right.
When the columns were hidden the horizontalScrollPosition was no longer valid 
and visibleColumns got out of sync with the newly updated displayableColumns.

Modified:
    
incubator/flex/sdk/branches/develop/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as

Modified: 
incubator/flex/sdk/branches/develop/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
URL: 
http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as?rev=1414303&r1=1414302&r2=1414303&view=diff
==============================================================================
--- 
incubator/flex/sdk/branches/develop/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
 (original)
+++ 
incubator/flex/sdk/branches/develop/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
 Tue Nov 27 18:21:07 2012
@@ -2345,6 +2345,13 @@ public class AdvancedDataGridBaseEx exte
             updateHeaderSearchList();
         
             createDisplayableColumns();
+            
+            // It is possible that columns became invisible and the hsp is no 
longer valid.
+            // Force visibleColumns to be recomputed now so if there are 
lockedColumns and
+            // updateSubContent() is called before updateDisplayList() is 
called,
+            // visibleColumns will be correct.
+            if (horizontalScrollPosition > visibleHeaderInfos.length)
+                horizontalScrollPosition = visibleHeaderInfos.length - 1;
         }
 
         super.commitProperties();


Reply via email to