【问题标题】:styling the a specific row of flex dataGrid为 flex dataGrid 的特定行设置样式
【发布时间】:2011-03-17 15:37:51
【问题描述】:

我在 flex 中有一个 dataGrid 组件。我的网格只有几行。
我只想将最后一行加粗。我只是不知道该怎么做。
我想到了一个想法:创建一个获取参数的工厂,以便我可以将 itemRenderer 传递给总行数。但是,我不知道如何检查 itemRenderer 本身中的当前行(并将其与总行进行比较)。
我在正确的方向吗?有没有简单的方法?
谢谢,

【问题讨论】:

    标签: apache-flex datagrid row styling itemrenderer


    【解决方案1】:

    为每一列使用一个 itemRenderer。

    在 itemRenderer 中,使用 DataGridListData.owner 属性获取 DataGrid 和 dataProvider 的挂钩。从那里进行比较,可能在 dataChange 事件的侦听器中:

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

    【讨论】:

      猜你喜欢
      • 2017-01-25
      • 1970-01-01
      • 2013-11-09
      • 1970-01-01
      • 2011-08-26
      • 2011-08-01
      • 2012-06-25
      • 2012-01-06
      • 2013-03-12
      相关资源
      最近更新 更多