代码之家  ›  专栏  ›  技术社区  ›  invertedSpear

如何从dataGridColumn的itemRenderer访问它?

  •  0
  • invertedSpear  · 技术社区  · 15 年前

    我正在使用一个基于文本的自定义组件作为显示XMLList的dataGrid的itemRenderer。我希望能够对多个列重复使用这个itemdrenderer,如何访问dataGridColumn以便知道要为文本值指定哪个字段?

    super.data提供了整个XML项,super.parentDocument提供了整个DataGrid

    提前谢谢。

    1 回复  |  直到 15 年前
        1
  •  3
  •   invertedSpear    15 年前

    很难找到答案,但答案是:

    data[(listData as DataGridListData).dataField
    

    你可以把我找到的文章通读一遍 here

    该链接将直接带您到我得到答案的页面,但是对于itemrenders的新手来说,整篇文章都是很好的读物。