tags:

views:

11

answers:

2

When I change the: list.selectedItem.name = 'name2'

then in my item renderer

the dataChange event is not fired! and I can't update the label with the name property...

any help?

+2  A: 

Only additions and deletions to a dataProvider are updated automatically - for modifications of an existing item to be auto-reflected, the particular property being updated should be declared as [Bindable]. Check if name property is bindable or not.

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";
Amarghosh
Thanks! perfect answer! ;)
Totty
A: 

Make the name property bindable.

splash