Anybody? --- In [email protected], "Anthony Onumonu" <[EMAIL PROTECTED]> wrote: > > I seem to be having very weird results. The correct image from my > cell renderer does not always display. I'm not sure if it's some > sort of caching from previous requests. > > Is the problem with the way I'm setting the data on the cell > renderer. I've tried various methods all rendering weird results. > > > Sample node from XML returned from HTTP request > > <file> > <file_name>file_directory_list.php</file_name> > <file_size>1.8</file_size> > <file_type>file</file_type> > <file_modified>27th January, 2007</file_modified> > <file_extension>php</file_extension> > </file> > > Cell Renderer > > <?xml version="1.0" encoding="utf-8"?> > <!-- itemRenderers\dataGrid\myComponents\RendererDGHeader.mxml --> > <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"> > <mx:Script> > <![CDATA[ > > import mx.controls.dataGridClasses.DataGridColumn; > > [Embed(source="png/php.png")] > [Bindable] > public var php:Class; > > private function setCustomIcon(setValue:String):void > { > image_id.source = this[setValue]; > } > ]]> > </mx:Script> > <mx:HBox horizontalAlign="center"> > <mx:Image id="image_id" x="20" height="20" > creationComplete="setCustomIcon(data.file_extension)" /> > </mx:HBox> > </mx:HBox> > > Datagrid > > <mx:DataGrid id="dgUserRequest" width="100%" > height="100%" dataProvider="{userRequest.lastResult.files.file}" > itemClick="itemClickEvent(event);" borderStyle="solid"> > <mx:columns> > <mx:DataGridColumn > width="120" headerText=" " dataField="file_type" > itemRenderer="renderer.icons"/> > <mx:DataGridColumn > headerText="Name" dataField="file_name"/> > <mx:DataGridColumn > headerText="Size" dataField="file_size"/> > <mx:DataGridColumn > headerText="Date Modified" dataField="file_modified"/> > <mx:DataGridColumn > headerText="Extension" dataField="file_extension"/> > </mx:columns> > </mx:DataGrid> >

