灵活:访问 nextLevelRenderer 中的数据
我正在尝试访问在 FlexDataGrid 的 nextLevelRenderer 中定义的 CheckBoxList 组件。你如何做到这一点?
我以为我可以使用 getLevelForItem( arg ) 并传入 FlexDataGrid 的 selectedItem,但我没有得到任何结果。
另外,网上有什么灵活教程的好地方吗?我找不到任何东西。
感谢您的帮助!
I'm trying to access a CheckBoxList component that is defined in a nextLevelRenderer of a FlexDataGrid. How do you do this?
I thought I could use getLevelForItem( arg ) and pass in the selectedItem for the FlexDataGrid, but I'm not getting anywhere with it.
In addition, is there a good place for flexicious tutorials online? I can't find anything.
Thanks for any help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Fumeng,尝试访问单元格对象可能不是最好的方法。在关卡渲染器中,当用户修改复选框列表时,您应该在数据提供程序上设置一些属性(如果您这样做(父级为 IFlexDataGridCell).rowInfo.data,您将获得关联数据对象的句柄。然后您可以访问 如果您确实必须使用单元格,则可以直接从数据对象中获取值
,网格有一个 bodyContainer 对象,它可以让您直接获取数据单元格的 API 方法,但没有用于 Level Renderer Cells 的方法。这些您将需要循环遍历各行。
Fumeng, Trying to access the cell object is probably is not the best way to do it. In your level renderer, when the user modifies the checkboxlist, you should set some property on the data provider (if you do (parent as IFlexDataGridCell).rowInfo.data, you will get a handle to the data object associated. You can then access the value directly from your data object.
If you really must use the cell, the grid has a bodyContainer object, which can get you into the grid's belly. There are API methods to get data cells directly, but none for Level Renderer Cells. For these you will need to loop through the rows.