[osflash] CellRenderer part 2

Merrill, Jason jason.merrill at bankofamerica.com
Mon Feb 26 10:11:11 EST 2007


Thank you, I actually figured this out a long time ago.  Thanks anyway,
 

Jason Merrill 
Bank of America  
Global Technology & Operations 
Learning & Leadership Development eTools & Multimedia Team 


 


________________________________

	From: osflash-bounces at osflash.org
[mailto:osflash-bounces at osflash.org] On Behalf Of Brian Williams
	Sent: Sunday, February 25, 2007 12:01 PM
	To: Open Source Flash Mailing List
	Subject: Re: [osflash] CellRenderer part 2
	
	
	you need to handle this in the setValue call.  The grid will
actually reuse the same instance for different rows of the dataprovider
when scrolling.  Note - if the setValue passes in null, you should hide
any visual components in your cell. 
	
	
	On 2/21/07, Merrill, Jason <jason.merrill at bankofamerica.com>
wrote: 

		OK - follow up question - (Flashcoders still down -
arggg... sorry - if
		someone knows a better list to ask this on (not forum,
not a fan of
		forums) please suggest so)
		
		Anyone know how to immediately set a component's state
in a CellRenderer 
		cell based on the dataprovider?  i.e. As soon as the
cell is rendered
		and component is there, if dataProvider says checked,
make the checkbox
		in the cell checked.  If dataproviders says
name:"Boston", set the 
		ComboBox in the cell to "Boston" in the cell.
		
		I've tried everything - I thought I could tap into the
constructor, but
		the constructor doesn't know what cell is being
rendered, and thus I
		cannot grab an index to get a value out of dataprovider.
Is there a way
		to know what the current cell is when the cell is
constructed? the
		following:
		
		        var index_obj = getCellIndex();
		        listOwner.dataProvider
[index_obj.itemIndex].receiveEmail =
		cb.selected;
		
		Only works later - like when the user clicks a checkbox,
but it fails
		during the constructor.  What I'm doing is grabbing data
from a
		webservice, and I need to pre-set the states of
components in datagrid 
		cells based on the webservice data.
		
		Thanks!
		
		Jason Merrill
		Bank of America
		Learning & Organizational Effectiveness
		
		
		
		
		
		
		
		_______________________________________________
		osflash mailing list
		osflash at osflash.org
		http://osflash.org/mailman/listinfo/osflash_osflash.org
		


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/osflash_osflash.org/attachments/20070226/d28659c3/attachment.htm


More information about the osflash mailing list