1st) Make a copy/backup of your dataProvider's data, not a reference copy, but a true deep copy, do this before you allow the user to start editing.
If you were using an ArrayCollection, you could use the Flex based ObjectUtil:
dataGridDataBackup = ObjectUtil.copy(myDataProvidersData) as ArrayCollection;
VectorCollection does not have a clone/copy (need to verify this...), but you can easily sub-class it and add a AMF-based (via byteArray) deep-copy, 5/6s line of code for that...
2nd) On your Cancel button click eventHandler:
myDataProvidersData.disableAutoUpdate();
myDataProvidersData.removeAll();
myDataProvidersData.addAll(ObjectUtil.copy(dataGridDataBackup) as ArrayCollection);
myDataProvidersData.enableAutoUpdate();
Note: This is from memory as I do not have AS3/Flex on this machine but should be pretty close...
Update:
Shallow copy a vector:
var myNewVector:Vector.<yourvectortype> = orginalVector.concat();
Deep copy (just change it to a vector instead of a dynamic object for performance):
function deepCopy(source:Object):* {
var _ba:ByteArray = new ByteArray();
_ba.writeObject(source);
_ba.position = 0;
return(_ba.readObject());
}
Note: If you are creating a vector of some complex class/object, you might need to register these class(es)... Again from memory, so adjust as needed...