// Copyright 2007. Adobe Systems Incorporated. All Rights Reserved. package fl.events { /** * The DataGridEventReason class defines constants that are used for the * values of the reason property of the DataGridEvent object * when the value of the type property is itemEditEnd. * * @see fl.controls.DataGrid * @see DataGridEvent * * @langversion 3.0 * @playerversion Flash 9.0.28.0 */ public final class DataGridEventReason { /** * The user canceled editing and does not want to save the edited * data. * *

Even if you call the preventDefault() method * from your event listener for the itemEditEnd event, * Flash still calls the destroyItemEditor() editor to close the editor.

* * @see flash.events.Event#preventDefault() Event.preventDefault() * @see fl.controls.DataGrid#destroyItemEditor() DataGrid.destroyItemEditor() * * @langversion 3.0 * @playerversion Flash 9.0.28.0 */ public static const CANCELLED:String = "cancelled"; /** * The list component lost focus, was scrolled, or is in a state where * editing is not allowed. * *

Even if you call the preventDefault() method from your event * listener for the itemEditEnd event, Flash still calls the * destroyItemEditor() editor to close the editor.

* * @see flash.events.Event#preventDefault() Event.preventDefault() * @see fl.controls.DataGrid#destroyItemEditor() DataGrid.destroyItemEditor() * * @langversion 3.0 * @playerversion Flash 9.0.28.0 */ public static const OTHER:String = "other"; /** * The user moved focus to a new column in the same row. * *

Your event listener can include logic that permits a change in focus * or that stops it. For example, if an event listener detects that the user * entered an invalid value, the event listener can make a call to the * preventDefault() method to stop focus from being moved to a * new item. The item editor remains open and the user continues to edit the * current item. To close the editor that is associated with the current item, * call the destroyItemEditor() method.

* * @see #NEW_ROW * @see flash.events.Event#preventDefault() Event.preventDefault() * @see fl.controls.DataGrid#destroyItemEditor() DataGrid.destroyItemEditor() * * @langversion 3.0 * @playerversion Flash 9.0.28.0 */ public static const NEW_COLUMN:String = "newColumn"; /** * Indicates that the user moved focus to a new row. * *

Your event listener can include logic that permits a change in focus * or that stops it. For example, if an event listener detects that the user * entered an invalid value, the event listener can make a call to the * preventDefault() method to stop focus from being moved to a * new row. The item editor remains open and the user continues to edit the * current item. To close the editor that is associated with the current item, * call the destroyItemEditor() method.

* * @see #NEW_COLUMN * @see flash.events.Event#preventDefault() Event.preventDefault() * @see fl.controls.DataGrid#destroyItemEditor() DataGrid.destroyItemEditor() * * @langversion 3.0 * @playerversion Flash 9.0.28.0 */ public static const NEW_ROW:String = "newRow"; } }