I've been trying to figure out this problem for a couple days.
My wife says "why don't you just post it on the empeg forums, those guys know everything."
I told her that I don't think there are any Flash wonks on here, but that I'd test the theory that you guys can answer any question...so without further ado:
I have a datagrid that is populated by the results of a remoting query(amfphp). The data displays just fine. However, whenever I try to edit any of the data, it changes back to the old value before the cellEdit event can even fire.
It specifically has something to do with how the datagrid binds itself to the data. For example take
gradebook2.swf.
The data is bound to the datagrid like so:
Code:
myDP = new Array();
myDP.push( new Array("","","","","","","","","","","","","",98,34,89,76,45) )
myDP.push( new Array("","","","","","","","","","","","","",98,34,89,76,45) )
myDP.push( new Array("","","","","","","","","","","","","",98,34,89,76,45) )
myDP.push( new Array("","","","","","","","","","","","","",98,34,89,76,45) )
spMain.content.centerGrid.dataProvider = myDP;
You'll notice that you can change the data in the grid.
Now take a look at
gradebook3.swf (note: you'll have to select a course and quarter to get some data in this one).
The data is bound to the datagrid like so:
Code:
GradeBook.getGrades(getGradesReply, SchoolID, TeacherID, ddCourse.value, ddQuarter.value);
var getGradesReply = new Object();
getGradesReply.onResult = function(result) {
spMain.content.centerGrid.removeAllColumns();
spMain.content.centerGrid.dataProvider = result;
}
As soon as the grid is bound to the result of a recordset, it ceases to allow me to edit
any of the data in the grid. Source code for the two movies is
gradebook2.fla and
gradebook3.fla.
Thanks again.
John