Hi, I would like your help on a fix for 

https://issues.apache.org/jira/browse/FLEX-33813 (DataGrid goes blank when 
scrolled and content is reset)

I managed to spot where the issue is:

Grid.as 
line 850:
const gridViewLayout:GridViewLayout = centerGridView.gridViewLayout;
 const gridMaxVSP:Number = contentHeight - height;
const centerContentHeight:Number = 
Math.ceil(gridViewLayout.gridDimensionsView.getContentHeight());
 const centerMaxVSP:Number = centerContentHeight - centerGridView.height;
const vsp:Number = (centerMaxVSP / gridMaxVSP) * value;
 centerGridView.verticalScrollPosition = vsp;

=> contentHeight  is NaN so all computations fails and verticalScrollPosiiton 
is set to NaN, which clears all the renderers (goes blank)

My assumption is that the Grid is not ready yet, so it's missing a 
validateNow() somewhere().

Call chain: 
Grid.dataProvider_collectionChangeHandler(event:CollectionEvent)
=> Grid.updateCaretForDataProviderChange(event:CollectionEvent):void

In Grid.updateCaretForDataProviderChange(): [line 5356], 
when managing RESET event in line 5448, 
if the caret is not found (which is the case, since all data is new),  we call 
directly 
verticalScrollPosition = 0;

=> I added validateNow() before the call, and it's fixed.

Do you validate ? 

Maurice 


Maurice Amsellem
SYSTAR R&D - BusinessBridgeFX

Reply via email to