1
votes

I have a dataGrid component in flex. My grid has few rows.
I simply want to make the last row bold. I just can't figure how to do it.
I thought about an idea : create a factory that gets parameters so that i can pass the itemRenderer the total count of rows. But, i don't know how to check the current row in the itemRenderer itself (and compare it to the total rows).
Am i in the right direction? Is there a simple way?
Thanks,

1

1 Answers

1
votes

Use an itemRenderer for each column.

In the itemRenderer, use the DataGridListData.owner property to get a hook to the DataGrid, and the dataProvider. From there just do a compare, probably in a listener to the dataChange event:

    if(this.listData.owner.dataProvider[this.listData.owner.dataProvider.length] == data){
 // Do Bold styling
} else {
 // don't do bold styling
}