Very nice solution, Valdhor, thank you. I do, however, need it for the very last row of data (visible or non-visible).
In the meantime, I've added an extra property to my data that will allow me to get what I need. So, instead of figuring out what label to put on a button by deciphering whether the renderer is rendering the last row of data, I just use a new 'label' property. Maybe a bit hackish, but it works. Thank you for your help. Matt --- In [email protected], "valdhor" <valdhorli...@...> wrote: > > That kinda depends on what you mean by the "last row of data". If you > mean the last visible row (Which is the last row rendered - the renderer > is only called for visible data) then you can try this... > > package > { > import mx.collections.ArrayCollection; > import mx.controls.*; > import mx.controls.dataGridClasses.DataGridListData; > > public class myRenderer extends Text > { > public function myRenderer() > { > super(); > } > > override public function set data(value:Object):void > { > super.data = value; > if(value != null) > { > text = value[DataGridListData(listData).dataField]; > if(listData.rowIndex == (owner as DataGrid).rowCount - > 1) > { > trace("Rendering the last row"); > } > } > } > } > } > --- In [email protected], "Matthew" <fumeng5@> wrote: > > > > Hi, > > > > I know the answer to this question before asking it but hopefully > someone has a found a way to do this. > > > > Is there a way to know (in my override of set data() method) whether > my item renderer is rendering the last row of data? > > > > thanks for any help on this one, > > > > matt > > >

