I see that DataGrid.focusOutHandler has the following, so it looks as though
I need a different approach:

        // however, if we're losing focus to anything other than the editor
or the grid

        // hide the editor;

        if (itemEditorInstance && (!event.relatedObject ||
!itemRendererContains(itemEditorInstance, event.relatedObject)))

        {

            // trace("call endEdit from focus out");

            endEdit(DataGridEventReason.OTHER);

On Nov 28, 2007 12:20 PM, Richard Rodseth <[EMAIL PROTECTED]> wrote:

> I have an item renderer/editor that does as-you-type validation using
> standard Flex validators, and updates a "valid" property in the data. I wish
> to prevent the edit from ending if the data is valid.
> When tabbing, the following works in column one, but not in column two
> (the last editable column):
>
>  private function handleItemEditEnd(event : DataGridEvent) : void {
>
> if (event.itemRenderer.data.valid) {
>
> // do some stuff
>
> } else {
>
> event.preventDefault();
>
> }
>
>
> Any ideas? Also, does the renderer get any access to this event? If I want
> to move "valid" from the data to the renderer itself, I suppose I would have
> to cast event.itemRenderer above to my renderer type, and call a method or
> access a property.
>
>
> Thanks.
>

Reply via email to