开发者

styling the a specific row of flex dataGrid

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜