Question
Update a single cell value in datagrid
Hi,
I want to update a single cell value in a datagrid, is this possible?
here is the code from adobe for replaceItemAt example:
my_dg.setSize(140, 100);
my_dg.move(10, 40);
replace_button.move(10, 10);
// Set up sample data.
var myDP_array:Array = new Array();
myDP_array.push({name:"Clark", score:3135});
myDP_array.push({name:"Bruce", score:403});
myDP_array.push({name:"Peter", score:25});
my_dg.dataProvider = myDP_array;
// Create listener object.
var buttonListener:Object = new Object();
buttonListener.click = function(evt_obj:Object) {
//Replace previous value
var prevValue_obj:Object = my_dg.replaceItemAt(2, {name:"Frank", score:949});
my_dg.selectedIndex = 2;
};
// Add button listener.
replace_button.addEventListener("click", buttonListener);
what I want to do is just replace the score with out doing anything to the name
Regards,
Kameshwaran A.