Did you ever have any luck resolving this? It's been a while since your post, but I'm having the same problem. It also happens in the AdvancedDataGrid.
-Hob --- In [email protected], "Pete" <[EMAIL PROTECTED]> wrote: > > Hi all, > > I'm having a fair amount of trouble getting an itemRenderer for a DataGrid > to work correctly. I have a drop down combo box that the users selects an > option from then retrieves data from a database based on that option. The > data is then returned to the Flex app and dropped in the ModelLocator > (Cairngorm). I have a DataGrid that's dataProvider property is bound to the > ModelLocator. Everything in the datagrid displays correctly except a > ProgressBar itemRenderer. It will work for the first execution, but if a > different set of data (or even the same data, returned again) is retrieved > from the database it won't display correctly. I have tried throwing an alert > in the itemRenderer so I can see when it is being called, and it seems that > it is only run properly on the first execution, every attempt after that, it > doesn't fire for every record that is returned. I have tried calling > invalidateDiplayList() and validateNow() from the datagrid, but to no avail. > Does anyone have any ideas? I have posted the code for the itemRenderer > below. I put it in a HBox so that I can position it correctly. > > <?xml version="1.0"?> > <mx:HBox > width="100%" > height="22" > xmlns:mx="http://www.adobe.com/2006/mxml" > verticalAlign="middle" > horizontalAlign="center" > creationComplete="initialiseProgressBar()"> > <mx:Script> > <![CDATA[ > > private function initialiseProgressBar():void { > if (data) { > if (data.progress == 0) { > pbModuleProgress.indeterminate = true; > } else { > pbModuleProgress.setProgress(data.progress,100); > } > pbModuleProgress.label= String(data.progress) + "%"; > } > } > ]]> > </mx:Script> > <mx:ProgressBar fontWeight="normal" width="90%" id="pbModuleProgress" > labelPlacement="center" minimum="0" maximum="100" mode="manual"/> > </mx:HBox> > > Thanks in advance, > > Pete > > > Pete Capra > Information Systems Coordinator > National Institute of Training > > p. (617) 3208 9455 > m. 0411 043 305 > f. (617) 3208 9855 > a. PO Box 1744 Springwood Q 4127 > > www.niot.com.au > [EMAIL PROTECTED] >

