6 Replies Latest reply on Mar 29, 2010 10:09 AM by dan.biran

    TileLayout fails to repaint after swapping dataProvider

    dan.biran

      I have a TileLayout on a List with a dataProvider rendering images for me through an itemRenderer.

       

      I have multiple collections that I'm using on the same list and swapping them out via a button.

       

      When I do the swap the layout incorrectly updates the display and only shows me the previous height if there was no scroll bar (ie if View 1 has 40 elements and is 4 elements wide and View 2 has 4 elements, when switching from view 2 to view 1 I would only see 4 elements again)

       

      I tried to update the display by setting the layout again:

       

      listObj.layout = new TileLayout();

       

      and this seemed to work. But I was getting some broken images displaying when switching the view. So I added a clear call to the swap:

       

      listObj.dataProvider.RemoveAll();

       

      and now I'm back where I started and the view wont update.

       

      Since there's no force repaint in flash I can't update the view correctly and am stuck.

       

      Please help,

      Thanks.