开发者

styling the a specific row of flex dataGrid

开发者 https://www.devze.com 2023-01-08 07:37 出处:网络
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 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,


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
}
0

精彩评论

暂无评论...
验证码 换一张
取 消