Copy link to clipboard
Copied
I need to bind the data being displayed in a datagrid to an array contained in an array.
The array of interest is located in AppModel.UserData[0].EmergencyContacts Where EmergencyContacts holds an array of 1 to n elements.
The structure looks like this:
The code I'm using for my datagrid looks like this:
<mx:DataGrid id="DG_ContactsGrid" y="8" width="530" height="80" change="EditData()"
dataProvider="{AppModel.UserData.getItemAt(0).EmergencyContacts}" horizontalCenter="0" styleName="DataGrid" >
<mx:columns>
<mx:DataGridColumn headerText="Contact Name" dataField="ContactName" width="110" />
<mx:DataGridColumn headerText="Ph Number" dataField="ContactPhNum" width="80" />
<mx:DataGridColumn headerText="Relationship" dataField="RelationshipType" width="100" />
</mx:columns>
</mx:DataGrid >
The form looks like this:
This code displays the correct values in the datagrid but when I update the data it's not bound to the array. I can see the contents of the array itself have been updated after the update utility runs but the contents in the datagrid doesn't change.
Any thoughts on why getItemAt() isn't working??? Well other than I'm not using it correctly!!! 😮
Thanks in advance for the insight!!!