setSort( )


Sets the dataset sort order.

The setSort function sorts the items in the dataset.

The WixDataSort object is created by calling the sort() function on wixData and chaining one or more of the following WixDataSort sort functions.

Setting a dataset's sort overrides existing sorts that were previously set using the setSort() function or using the Dataset Settings panel in the editor.

To clear a dataset's current sort, call setSort() and pass it an empty sort. You create an empty sort by calling the sort() function without chaining any of the additional sort functions mentioned above.

Calling setSort() on a write-only dataset causes an error.

You must import wix-data to create a WixDataSort object.

Notes:

Method Declaration
Copy
Method Parameters
sortWixDataSortRequired

A wix-data sort object.

Did this help?