  *  @productversion Flex 4.5
  */
 [Event(name="selectionChange", type="spark.events.GridSelectionEvent")]
+
+/**
+ *  Dispatched before the sort has been applied to the data provder's collection.
+ *  Calling the <code>preventDefault()</code> method
+ *  on the event prevents the sort from being applied.
+ *  Alternatively you can modify the <code>columnIndices</code> and 
+ *  <code>newSortFields</code> paramters of the event if you want to change the default 
+ *  behavior of the sort.
+ *  
+ *  <p>This event is dispatched when the user interacts with the control.
+ *  When you sort the data provider's collection programmatically, 
+ *  the component does not dispatch the <code>sortChanging</code> event. </p>
+ *
+ *  @eventType spark.events.GridSelectionEvent.SORT_CHANGING
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ */
+[Event(name="sortChanging", type="spark.events.GridSortEvent")]
+
+/**
+ *  Dispatched after the sort has been applied to the data provder's collection. 
+ *  
+ *  <p>This event is dispatched when the user interacts with the control.
+ *  When you sort the data provider's collection programmatically, 
+ *  the component does not dispatch the <code>sortChanging</code> event.
+ *  In either case it dispatches the <code>valueCommit</code> event as well.</p>
+ *
+ *  @eventType spark.events.GridSelectionEvent.SELECTION_CHANGE
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5
+ */
+[Event(name="sortChange", type="spark.events.GridSortEvent")]
 
 //--------------------------------------
 //  Edit Events

        else
            sort = new Sort();
        
        var sortFields:Array = createSortFields(columnIndices, sort.fields);
        if (!sortFields)
            return false;
        
        // Remove each old SortField that's not a member of the new sortFields Array
        // as a "styleClient" of this DataGrid.
        
        const oldSortFields:Array = (dataProvider.sort) ? dataProvider.sort.fields : null;
        if (oldSortFields)
        {
            for each (var oldSortField:ISortField in oldSortFields)

import spark.events.GridEvent;
import spark.events.GridSelectionEvent;
import spark.events.GridSelectionEventKind;
import spark.events.GridSortEvent;

use namespace mx_internal;

