Flex DataGrid labelFunction 没有被调用
我有一个 DataGrid,其中一列有一个 labelFunction。当我运行该应用程序时,DataGrid 中会显示一个滚动条,指示我它有数据,但 DataGrid 中没有任何内容。当我滚动项目时开始显示。当我调试它时,我注意到 labelFunction 在我开始滚动之前从未被调用。有谁知道为什么会发生这种情况?
I have a DataGrid where one of the columns has a labelFunction. When I run the application a scrollbar shows up in the DataGrid indicating to me that it has data but there is nothing in the DataGrid. When I scroll items start showing up. When I Debugged it I noticed that the labelFunction was never being called until I started scrolling. Does anyone know why this is happening?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您在设置
dataProvider
后稍后使用 ActionScript 分配labelFunction
,请尝试调用 datagrid.invalidateList() 或 datagrid.updateList() 分配后 - 这些函数强制刷新所有行。If you are assigning
labelFunction
at a later time using ActionScript after setting thedataProvider
, try calling datagrid.invalidateList() or datagrid.updateList() after assigning it - these functions force a refresh of all the rows.