当我更改: list.selectedItem.name = 'name2‘时
然后在我的项目渲染器中
未激发dataChange事件!我不能用name属性更新标签...
有什么帮助吗?
发布于 2010-10-22 11:10:06
只有对dataProvider
的添加和删除才会自动更新-对于要自动反映的现有项的修改,要更新的特定属性应声明为[Bindable]
。检查name
属性是否可绑定。
public class Item
{
public var noBinds:String = "initvalue";
[Bindable]
public var bindMe:String = "initvalue";
//a constructor that takes two arguments goes here
}
//dp is the dataProvider of a data grid with two columns:
//this will add new item to the grid
dp.addItem(new Item("blah", "blah1"));
/* update the selected item */
//not bindable
dp.selectedItem.noBinds = "new string; but not shown";
//update the Bindable item
dp.selectedItem.bindMe = "new string; this will be updated";
发布于 2010-10-22 11:14:26
将name
属性设置为bindable。
https://stackoverflow.com/questions/3995796
复制相似问题