I'm new to flash remoting and I'm trying to load the result set from a CFC
query into a datagrid (Flash MX 2004 Pro, using DataGrid UI component).
So far, I've been successful in doing this with one BIG problem. When I
attempt to modify the values in the datagrid, the datagrid reverts back to the
original value in the cell I just modified instead of the value I just keyed
in, as soon as I click on another cell. This does not happen if I use a
"hardwired" array instead of the result object as the datagrid dataProvider.
Can anybody tell me what I'm doing wrong?
Below is the actionscript I'm using to load the datagrid:
myQueryFunctionResponse.prototype.onResult = function(result) {
// id carries parameter value loaded at remote CFC invocation time
trace("The response came from the call with id " + this.id);
// setDeliveryMode is optional
result.setDeliveryMode("fetchall");
// this links the result RecordSet returned by Flash Remoting
// to a UI datagrid component
myArray = new Array();
myArray.push({US_ID:"11", US_FIRST_NAME:"Mike", US_LAST_NAME:"Smith"});
myArray.push({US_ID:"12", US_FIRST_NAME:"Susan", US_LAST_NAME:"Green"});
//myArray = result;
myDataGrid.dataProvider = myArray;
};
This works -- I can change values in the cells and they remain as modified.
But if I uncomment out the line near the bottom "myArray=result;" I have the
problem described.