Clear Up
SharpKit Reference

Sortable Class

Namespace: Ext.util

Base Types

System.Object

Constructors

Name Description
Sortable()

Methods

Name Description
decodeSorters(JsArray) @private Normalizes an array of sorter objects, ensuring that they are all Ext.util.Sorter instances @param {Array} sorters The sorters array @return {Array} Array of Ext.util.Sorter objects
getSorters()
initSortable() Performs initialization of this mixin. Component classes using this mixin should call this method during their own initialization.
sort(object, JsString, object, object) 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 {@link Ext.util.Sorter} instances, and delegates the actual sorting to its internal {@link 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'); * @param {String/Ext.util.Sorter[]} sorters Either a string name of one of the fields in this Store's configured {@link Ext.data.Model Model}, or an array of sorter configurations. @param {String} direction The overall direction to sort the data by. Defaults to "ASC". @return {Ext.util.Sorter[]}

Properties

Name Description
defaultSortDirection @property {String} defaultSortDirection The default sort direction to use if one is not specified (defaults to "ASC")
isSortable @property {Boolean} isSortable Flag denoting that this object is sortable. Always true.
© Copyright 2005-2011 SharpKit. All rights reserved.