In a Flash CS6 project, I have an array with 5 separate dataproviders that supplies the data for an editable datagrid called priceGrid.
var priceGrid:DataGrid = new DataGrid(); var enterPriceDataProviderArray:Array = new Array(new DataProvider(), new DataProvider(), new DataProvider(), new DataProvider(), new DataProvider()); priceGrid.dataProvider = enterPriceDataProviderArray[arrayIndex];
I have an event listener for when the user edits a specific cell in the datagrid with one of the dataproviders supplying data, the global variable credit is updated.
credit = priceGrid.columns.itemToLabel(priceGrid.getItemAt(0));
I would like to be able to update the other dataproviders in the array with the new value of credit that the user changed. In this way, I'm hoping that the datagrid will update with the new value of credit irrespective of whichever dataprovider supplies the data. The address in the datagrid is the same for all the other data providers.
Can I use the replaceItemAt method to be able to do this? Can someone please give me an example code of what this would look like?