4 Replies Latest reply on Apr 21, 2010 8:12 AM by daslicht

    how to refresh a Spark List manually ?

    daslicht Level 2

      Hello,

      I am Building a News Module which consists of a DataGrid and a Spark List with a customItemRenderer.

       

      When I click on Item in the DataGrid I get the 'newsID' of the clicked Item and receive the associated newsDetails from my database into a ArrayCollection.

       

      This Array Collection is the dataprovider of my Spark List.

       

      Ok, so far so good , when I click teh first Item anything is working as it supposed to be.


      But when I click the second entry for example, teh spark list is not following and displaying the changed data but the ArrayCollections data is updating.

      I verified that by binding it to another dataGrid which has the ArrayCollection as DataProvider.

       

      So my question now is how to manually Refresh a Spark List .

       

      On google I found that someone suggested to set the ItemRenderer of the Spark List to null and re-declare it.

      http://www.mail-archive.com/flexcoders@yahoogroups.com/msg132923.html

      How would i do that programatically?

       

      myList.itemRenderer = null and than?

       

      My custom item renderer is called HListRenderer.mxml

       

      Any Help is much appreciated

      Marc