Hi Alex,

Yes, I'm getting those trace statements & with the background property
as true for the item that I modified.  I've moved the same code to the
"set data(item:Object) function instead & it worked.

Thanks all for your help.

Ban

--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Looks ok to me.  Are you getting trace statements so you know it is
> hooked up correctly?
> 
>  
> 
> How do you update the data?  If you use setItemAt or completely replace
> items it won't work.  It is only coded to accept changes to an object's
> properties.
> 
>  
> 
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of letterpigeon
> Sent: Wednesday, February 27, 2008 3:25 PM
> To: [email protected]
> Subject: [flexcoders] Re: Highlight data cell when the cell data is
> change
> 
>  
> 
> Hi Alex,
> 
> I followed the example in your blog except that for the blinking part
> (I want the color to stay). but not sure why it's not working. Would
> you please take a look at the renderer code for me & let me know if
> I'm missing anything.
> 
> public class NumberCellRenderer extends DataGridItemRenderer
> {
> private var lastUID:String = null;
> private var lastText:String = null;
> 
> public function NumberCellRenderer()
> {
> //TODO: implement function
> super();
> }
> 
> override public function validateNow():void
> {
> super.validateNow();
> 
> var needBlink:Boolean = false;
> 
> if(!listData)
> {
> background = false;
> return;
> }
> 
> var dgListData:DataGridListData = listData as DataGridListData;
> var grid:DataGrid = dgListData.owner as DataGrid;
> 
> if(dgListData.uid == lastUID)
> {
> if(lastText != dgListData.label)
> {
> needBlink = true;
> }
> }
> 
> lastUID = dgListData.uid;
> lastText = dgListData.label;
> 
> if(needBlink)
> {
> background = true;
> backgroundColor = 0xFF0000;
> trace("backgroundcolor: " + backgroundColor);
> }
> else
> {
> background = false;
> }
> 
> trace("needblink=" + needBlink + ",background="+background +
> ",color=" + backgroundColor);
> }
> 
> }
> 
> Regards,
> 
> Ban
> 
> --- In [email protected] <mailto:flexcoders%40yahoogroups.com>
> , "Alex Harui" <aharui@> wrote:
> >
> > There's an example on my blog (blogs.adobe.com/aharui)
> > BlinkItemRenderer
> > 
> > 
> > 
> > ________________________________
> > 
> > From: [email protected] <mailto:flexcoders%40yahoogroups.com>
> [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
> ] On
> > Behalf Of Jehanzeb Musani
> > Sent: Wednesday, February 27, 2008 2:19 PM
> > To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> > Subject: Re: [flexcoders] Highlight data cell when the cell data is
> > change
> > 
> > 
> > 
> > Hello,
> > 
> > Set itemrenderer for the cell that you want to
> > highlight when data change. In itemrenderer, override
> > the function "set data(...)". Inside set data, code
> > the logic to set the styles as per your requirement.
> > 
> > Regards,
> > Jehanzeb
> > 
> > --- letterpigeon <ban.luc@ <mailto:ban.luc%40ms.com> > wrote:
> > 
> > > Hi all,
> > > 
> > > I'm trying to have the datagrid cell (not row)
> > > highlighted (bold,
> > > color, etc) when the data for that cell is changed. 
> > > What would be the
> > > best way of doing this?
> > > 
> > > I'm thinking about having a function in the item
> > > renderer & whenever
> > > the data is change, I'll get an instance of that
> > > renderer & invoke
> > > that function to change the style of the cell. But
> > > the
> > > Datagrid.itemToItemRenderer(item) function is only
> > > returning the item
> > > renderer of the first column. What I need is given
> > > the row index and
> > > the data field, how do I get to the renderer of that
> > > particular cell?
> > > 
> > > Or shall I be doing this differently??
> > > 
> > > Any pointers would be greatly appreciated.
> > > 
> > > Thanks and regards,
> > > Ban
> > > 
> > > 
> > > 
> > > 
> > 
> > __________________________________________________________
> > Looking for last minute shopping deals? 
> > Find them fast with Yahoo! Search.
> > http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> <http://tools.search.yahoo.com/newsearch/category.php?category=shopping>
> 
> >
> <http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> <http://tools.search.yahoo.com/newsearch/category.php?category=shopping>
> >
> >
>


Reply via email to