Skip navigation
M.Kang
Currently Being Moderated

Flex 3 Item renderer in List dissapear and shifted place

Aug 15, 2012 7:03 PM

Tags: #flex #actionscript_3.0 #flex3

I successfully added ItemRenderer in my List but whenever I scroll down to the bottom and scroll up again. The ItemRenderer in the List would be either gone or shifted places.

I have search up on possible solution but they doesn't seen like working. I tried to put dataChange=”validateNow()” in the ItemRenderer but it doesn't work. I read something about useVirtualLayout="false" but it seen like my List doesn't have useVirtualLayout ?

<mx:List 
       
id="rowsList2" width="{VBoxCall.width}" height="{ scheduleViewerHeight }"
       
rowHeight="{ scheduleViewer.rowHeight }"
       
verticalScrollPolicy="off" verticalAlign="middle"
        
horizontalScrollPolicy="off"
       
alternatingItemColors="[0xEEEEEE, 0xDFDFDF]" itemRenderer="RendererState">
       
<!-- Example to showcase Item renderer -->
       
<mx:dataProvider>
           
<mx:Object label="Mr Swabby"
                      
data="Juneau"
                      
webPage="http://www.state.ak.us/"/>
           
<mx:Object label="Mrs Harrington"
                      
data="Montgomery"
                      
webPage="http://www.alabama.gov/" />
       
</mx:dataProvider>
   
</mx:List>

Before (picture) http://i.stack.imgur.com/VxoeP.gif

After (picture) http://i.stack.imgur.com/3qHO9.gif

Any Ideas ?

Regards, Mike

 
Replies
  • Currently Being Moderated
    Aug 15, 2012 11:36 PM   in reply to M.Kang

    UseVirtualLayout is for Spark List.  You issue sounds like a recycling problem.  See the item renderer posts on my blog.

     

    --

    Alex Harui

    Flex SDK Team

    Adobe Systems, Inc.

    http://blogs.adobe.com/aharui

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 17, 2012 10:15 AM   in reply to M.Kang

    You have code that removes Button, but I don’t see any code to re-add it.  Once the Button is removed and that renderer is recycled, it will not get re-added.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points