3 Replies Latest reply on Oct 5, 2009 4:11 PM by msakrejda

    Changing a control's state thru DataProvider


      Hi.  I am using a custom treeview-checkbox control.  The example I am using works great when the DataProvider is XML.  However, my DataProvider is an array of hash objects.  With this DataProvider, the tree displays correctly, but does not respond to the ActionScript written to handle the interactivity of the checkboxes.  I traced it down to this malfunctining example:


      this.myTree2.dataProvider[8].checked = 2;


      That line is fired onItemCheck.  The custom treeview-checkbox has three checked states.  0 = unchecked, 1 = checked, 2 = middle mode represented as a gray box.  Initially, all items are checked = 0.  When I execute the line above, the DataProvider contents does indeed change (according to the debugger), but the control itself does not update visually.  Returning to that line a second time, DataProvider is still in the checked = 2 state.


      I'm new to Flex programming, but I'm an experienced .NET web app programmer.  Is there something I need to do, like "refresh" the control when the DataProvider contents changes?


      I'm using Flex Builder 3 on WinXP, testing primarily with IE7.  Thanks for any insight you all may have.