Thanks for your response. If Image is used as a renderer, would it load the image pointed to by the URL? If the image is already loaded by loader class (for a different purpose and is available in a local cache), would this not be redundant load?
-nj --- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote: > > If your data objects contain an imageAttr field that is a URL, you can > use Image as your renderer. You shouldn't need to fool around with the > image.data or setting the image into your dataArray. > > > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of natjai > Sent: Friday, April 11, 2008 11:29 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] DataGrid itemRenderer and Loader Class > > > > Hello, > I am new to flex, i apologize if this questions seems out of context. > > I have an image loaded with the Loader class in actionscript (say > in a variable loader) > > I need to display this image onto a DataGrid Cell. > > Can i use a drop-in itemRenderer of Image class? > > Assuming the dataGrid has been set with a dataprovider > dataArray[rows][columns], > > And the specified (dynamic) dataColumn in question is set > dataGridColumn.dataField = "imageAttr" > > Could i do something like > var image:Image = new Image(); > > image.data = Bitmap(loader).bitmapData > > dataArray[row]["imageAttr"] = image > > If this is not possible and i need to write a customRenderer, can you > please guide me with a sample? > > thanks, > -nj >