X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6a7e4474cba9d8be4b2ec445e10f1691f7277c50..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/docs/api/Ext.util.Sortable.html diff --git a/docs/api/Ext.util.Sortable.html b/docs/api/Ext.util.Sortable.html new file mode 100644 index 00000000..f2af8139 --- /dev/null +++ b/docs/api/Ext.util.Sortable.html @@ -0,0 +1,112 @@ +
A mixin which allows a data component to be sorted. This is used by e.g. Ext.data.Store and Ext.data.TreeStore.
+ +*NOTE**: This mixin is mainly for internal library use and most users should not need to use it directly. It +is more likely you will want to use one of the component classes that import this mixin, such as +Ext.data.Store or Ext.data.TreeStore.
+The default sort direction to use if one is not specified (defaults to "ASC")
+The default sort direction to use if one is not specified (defaults to "ASC")
+Flag denoting that this object is sortable. Always true.
+Flag denoting that this object is sortable. Always true.
+Returns an object describing the current sort state of this Store.
+Returns an object describing the current sort state of this Store.
+The sort state of the Store. An object with two properties:
The name of the field by which the Records are sorted.
The sort order, 'ASC' or 'DESC' (case-sensitive).
Performs initialization of this mixin. Component classes using this mixin should call this method +during their own initialization.
+Sorts the data in the Store by one or more of its properties. Example usage:
+ + +//sort by a single field
+myStore.sort('myField', 'DESC');
+
+//sorting by multiple fields
+myStore.sort([
+ {
+ property : 'age',
+ direction: 'ASC'
+ },
+ {
+ property : 'name',
+ direction: 'DESC'
+ }
+]);
+
+
+
+Internally, Store converts the passed arguments into an array of Ext.util.Sorter instances, and delegates the actual +sorting to its internal Ext.util.MixedCollection.
+ + +When passing a single string argument to sort, Store maintains a ASC/DESC toggler per field, so this code:
+ + +store.sort('myField');
+store.sort('myField');
+
+
+
+Is equivalent to this code, because Store handles the toggling automatically:
+ + +store.sort('myField', 'ASC');
+store.sort('myField', 'DESC');
+
+
+Either a string name of one of the fields in this Store's configured Model, +or an Array of sorter configurations.
+The overall direction to sort the data by. Defaults to "ASC".
+