1 Reply Latest reply on Jul 8, 2008 1:33 PM by ntsiii

    Weird thing going on with ItemRenderer on a DataGridColumn

      Hi all, my applications is pretty simple. It is basically a DataGrid with a series of rows mapping to a list of "jobs" each with a different status according to the progress of that "job". The datagrid is constantly updating using a setInterval which on that interval, calls a HTTPService.send() which calls a service to an XML file (which is dynamic and shows the latest "statuses" of all the jobs. The result of this service.send is the datagrid gets updated with the latest data.

      The weird thing is that i have a custom itemRenderer on my status field (solved via another post - thanks!) that keeps weirdly scrolling whenver the data gets reloaded. I did a search and used a ChangeWatcher to stop it scrolling, but I have some ComboBoxes in my custom item renderer and the values of the combo boxes now keep changing whenever the data loads :(

      I;m really confuzzled and any help would be much appreciated.

      Here are the files I am using:


        • 1. Re: Weird thing going on with ItemRenderer on a DataGridColumn
          ntsiii Level 3
          That is not the normal way to write an itemRenderer and I am not surprised it behaves strangely.

          Item renderers are tightly integrated with the Flex framework and can be a bit complicated. I advise that you find an example or two of a renderer and mimic its structure. I have never seen a changeWatcher used in a renderer.

          Briefly, renderers should override the set data(), commitProperties() and updateDisplayList() methods to work well with the framework.

          Alex Harui has several good examples on his blog, and there are many others available as well.