You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by pi...@apache.org on 2020/10/21 11:41:58 UTC

[royale-asjs] branch develop updated: MXRoyale: Add sortableColumns stub

This is an automated email from the ASF dual-hosted git repository.

piotrz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new c41b686  MXRoyale: Add sortableColumns stub
c41b686 is described below

commit c41b686c767f671acf6bc1eb8d8d03b8807f9b65
Author: Piotr Zarzycki <pi...@gmail.com>
AuthorDate: Wed Oct 21 13:41:28 2020 +0200

    MXRoyale: Add sortableColumns stub
---
 .../src/main/royale/mx/controls/DataGrid.as        | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DataGrid.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DataGrid.as
index 4d8c296..329cc05 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DataGrid.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/DataGrid.as
@@ -767,6 +767,39 @@ public class DataGrid extends DataGridListBase/*ListBase*/ implements IDataGrid/
      */
     public var resizableColumns:Boolean = true;
 
+    /**
+     *  A flag that indicates whether the user can sort the data provider items
+     *  by clicking on a column header cell.
+     *  If <code>true</code>, the user can sort the data provider items by
+     *  clicking on a column header cell.
+     *  The <code>DataGridColumn.dataField</code> property of the column
+     *  or the <code>DataGridColumn.sortCompareFunction</code> property
+     *  of the column is used as the sort field.
+     *  If a column is clicked more than once
+     *  the sort alternates between ascending and descending order.
+     *  If <code>true</code>, individual columns can be made to not respond
+     *  to a click on a header by setting the column's <code>sortable</code>
+     *  property to <code>false</code>.
+     *
+     *  <p>When a user releases the mouse button over a header cell, the DataGrid
+     *  control dispatches a <code>headerRelease</code> event if both
+     *  this property and the column's sortable property are <code>true</code>.
+     *  If no handler calls the <code>preventDefault()</code> method on the event, the
+     *  DataGrid sorts using that column's <code>DataGridColumn.dataField</code> or
+     *  <code>DataGridColumn.sortCompareFunction</code> properties.</p>
+     *
+     *  @default true
+     *
+     *  @see mx.controls.dataGridClasses.DataGridColumn#dataField
+     *  @see mx.controls.dataGridClasses.DataGridColumn#sortCompareFunction
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var sortableColumns:Boolean = true;
+
     [Inspectable(environment="none")]