--- In [email protected], "valdhor" <valdhorli...@...> wrote:
>
> I would be inclined to extend the datagrid and add a variable to handle
> this. You can compute the total from the dataprovider when it arrives
> from the server and pass that in as a bound variable to the custom
> datagrid. Example follows...
Another approach is to use a ClassFactory for the renderer, and pass in a
function to be used as a callback for validation. Something like:
var cf:ClassFactory = new ClassFactory(someRendererClass);
cf.properties = {validationCallback:someFunction};
yourDG.itemRenderer = cf;
...
someFunction(dataItem:YourDataType):Boolean {
//validate dataItem against the collection
return true;//or false
}
Then in the renderer:
public function set validationCallBack(value:Function):void {
_validationCallback=value;
}
private function onValueCommitOrWhatever(e:event):void {
if (_validationCallback) {
_isValid = _validationCallback(_data);
}
}
n stuff.
HTH;
Amy