Sorts records in the grid.
sort()
OR
search(field, [direction, [multiField]])
field |
string, field name to search by |
direction |
string, direction of search asc/desc (optional) |
multiField |
boolean, indicates if previous sort needs to be cleared (optional) |
Returns
undefined.
Description
This method sorts records in the
.records array if you have local
data source or it will submit to the server if your data source is remote. If you call this method without parameters, it
will reset the sort.
If
multisort is true, it will do sorting by multiple fields, as it will keep presious sorts as well.
So, if you call:
it will first sort records by field1 and then by field2 at the same time.
If you have a grid defined in the following way:
You can do following searches: