Rowset.sort()

  • 1 August 2022
  • 1 reply
  • 17 views

This article is about the sort() function of the Rowset object.

Rowset.sort()

Sorts the rows in a rowset.

Returns the 'this' object.

Syntax

row-set.sort( target )

target ::= { client | server | auto }

The optional target is a string that determines where the sorting should take place. Possible values are 'client', 'server' or 'auto' (the default). The 'auto' value sorts on the server except when, for one of the columns, a user-defined sorting function has been specified. In that case the sorting is done on the client.

Example

$.udb('EMP').rowset('current').sort();

 


1 reply

The Rowset.sort() can now be used with

    Rowset.sort({success: <success func>, error: <error func>});

 

It returns a promise, si it can also be used as:

   Rowset.sort().then(<succes func>);

Reply