X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/docs/api/Ext.data.SortTypes.html diff --git a/docs/api/Ext.data.SortTypes.html b/docs/api/Ext.data.SortTypes.html new file mode 100644 index 00000000..7263ce6d --- /dev/null +++ b/docs/api/Ext.data.SortTypes.html @@ -0,0 +1,122 @@ +
This class defines a series of static methods that are used on a +Ext.data.Field for performing sorting. The methods cast the +underlying values into a data type that is appropriate for sorting on +that particular field. If a Ext.data.Field.type is specified, +the sortType will be set to a sane default if the sortType is not +explicitly defined on the field. The sortType will make any necessary +modifications to the value and return it.
+ ++It is also possible to create a custom sortType that can be used throughout +an application. +
Ext.apply(Ext.data.SortTypes, {
+ asPerson: function(person){
+ // expects an object with a first and last name property
+ return person.lastName.toUpperCase() + person.firstName.toLowerCase();
+ }
+});
+
+Ext.define('Employee', {
+ extend: 'Ext.data.Model',
+ fields: [{
+ name: 'person',
+ sortType: 'asPerson'
+ }, {
+ name: 'salary',
+ type: 'float' // sortType set to asFloat
+ }]
+});
+
+
+
+Date sorting
+Date sorting
+The value being converted
+The comparison value
+Float sorting
+Float sorting
+The value being converted
+The comparison value
+Integer sorting
+Integer sorting
+The value being converted
+The comparison value
+Strips all HTML tags to sort on text only
+Strips all HTML tags to sort on text only
+The value being converted
+The comparison value
+Case insensitive string
+Case insensitive string
+The value being converted
+The comparison value
+Strips all HTML tags to sort on text only - Case insensitive
+Strips all HTML tags to sort on text only - Case insensitive
+The value being converted
+The comparison value
+