Use this method and put the stuff inside this function. Here the Object is a row
override public function set data(value :Object){ super.data = value; // your code // your code } Thanks, with Regards, Jitendra Jain ________________________________ From: Tim Hoff <[EMAIL PROTECTED]> To: flexcoders@yahoogroups.com Sent: Tuesday, 21 October, 2008 7:10:02 AM Subject: [flexcoders] Re: How can I make an ItemRenderer on a Datagrid react to a row selection? Shoot, don't even worry about the rowIndex, just attach the data object to the event. -TH --- In [EMAIL PROTECTED] ups.com, "Tim Hoff" <[EMAIL PROTECTED] > wrote: > > > Yeah, you would be hosed if a different type of list was used. If > you're using CHANGE, which is generic for list base, have the parent > class dispatch a custom event, on change, with the row index. The > parent class will always know what kind of list is being used. Then in > the itemRenderer listen for the custom event and compare the rowIndex to > listData.rowIndex. This is so much easier to handle through the data, > but some don't care for the decorator pattern. > > -TH > > --- In [EMAIL PROTECTED] ups.com, João joao.saleiro@ wrote: > > > > I solved it by implementing the IDropInListItemRend erer and listening > to > > > > DataGrid(listData. owner).addEventL istener(ListEven t.CHANGE, > > listChangeHandler) > > > > It's not a best practice, but for now it's enough. > > > > JS > > > > --- In [EMAIL PROTECTED] ups.com, Jo�o joao.saleiro@ wrote: > > > > > > Hi, > > > > > > I have a Datagrid with several rows and columns. I am using > > > ItemRenderers on the cells. I need that a specific ItemRenderer > > > changes the way it looks when the row where he's in is selected. How > > > can I achieve that? > > > Is it possible to make the itemrenderer know that and react in real > > > time? Or is it preferable to extend the DataGrid? > > > > > > Thanks, > > > > > > João Saleiro > > > > > > Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php