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: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of natjai
Sent: Friday, April 11, 2008 11:29 AM
To: [email protected]
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



 

Reply via email to