开发者

invalidateList(); in flex3.0

开发者 https://www.devze.com 2023-01-01 07:33 出处:网络
please tell me what invalidateList(); function does? i have one line of code, in which this function is getting called on arraycollection object

please tell me what invalidateList(); function does?

i have one line of code, in which this function is getting called on arraycollection object

like

dg.invalidateList();

where dg is the id of datagrid, dataprovider for this dg is colors which is an arraycollection?? plzz tell me wht the invalidat开发者_运维百科eList() function is doin? thanx


I would be willing to bet that whoever wrote that was trying to get the datagrid to refresh after the underlying arrayCollection was updated somehow. The better way of doing this is to dispatch a CollectionChange event on the arrayCollection after the update is made.

Example:

myArrayCollection.dispatchEvent( new CollectionEvent(CollectionEvent.COLLECTION_CHANGE) );


Refer to this StackOverflow debate:

what is the difference between invalidateList and invalidateDisplayList?

Seems to me everything was explained there :) Ladislav

0

精彩评论

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