Waldo Smeets .com on Rich Internet Applications

Sales Engineer from Adobe Benelux on Rich Internet Applications, Web 2.0 and Adobe Flex in the Benelux.


Flex Lesson Learned: Changing items in a Model bound to a UI Component

Note to self and anyone else who is about to make the same mistake; if you have bound a Flex Data Model as DataProvider to a UI component, you must not change any items in that Model by approaching the item directly. The correct way to do so is by approaching the item through the DataProvider API. Otherwise the UI object you have bound to will never know that it needs to redraw (i.e visually represent the changes to your Model).

Don’t: myGrid.getItemAt(itemIndex).myField = 1;
Do: myGrid.dataProvider.editField(itemIndex, “myField”, 1);

1 Response to “Flex Lesson Learned: Changing items in a Model bound to a UI Component”


  1. 1 nig Jul 13th, 2004 at 7:42 pm

    Yup, same applies in Flash :)

Comments are currently closed.