> For the complete documentation index, see [llms.txt](https://docs.emobiq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/app/sortingenable.md).

# sortingEnable

## Description

Enables the ability to sort a datalist component.

## Input / Parameter

N/A

## Output

N/A

## Callback

N/A

## Video

Coming Soon.

## Example

In this example, we will first create a data list, which can then be made sortable with the `sortingEnable` function.

### Steps

1. First, add a "Enable Sorting" button and a datalsit component to the page.

   ![](/files/BM4OJ8o0Orv6tDYHmKJQ)
2. To load data into the datalist, we will need to create the following event flow.

   ![](/files/6MNbYZM1IiT7Y46g9RDf)

   a. For the `dataFromString` function

   ![](/files/kuUrdqt1uwJk417E3DV5)

   | Field   | Value                            |
   | ------- | -------------------------------- |
   | dataset | l\_user                          |
   | string  | ![](/files/hfb5DpeZmuXkyTctvNTp) |

   b. For the `loadData` function ![](/files/LzN5tC4gEMEqGUtfFFbg)
3. Finally, for our "Enable Sorting" button, we will add the `sortingEnable` function when the button is clicked.

   ![](/files/yj6p44GKumm9IVFr9ayO)

### Result

![](/files/IE25CfNC7ortM5fkKYW7)

## Links
