# Tree View Auto Sorting

**URL:** <https://forum.inductiveautomation.com/t/tree-view-auto-sorting/96634>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [September 30, 2024, 8:17pm UTC](https://forum.inductiveautomation.com/t/tree-view-auto-sorting/96634 "2024-09-30T20:17:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Platt](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@Jason\_Platt](https://forum.inductiveautomation.com/u/Jason_Platt)\
**Post date:** [September 30, 2024, 8:17pm UTC](https://forum.inductiveautomation.com/t/tree-view-auto-sorting/96634/1 "2024-09-30T20:17:39Z")

</div>

Before I try to reinvent the wheel, does anyone know a way to get the tree view to not auto sort my windows? Trying to go step 10, step 20, step 30....

 ![Window Nav](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/2/12404853e0b3c94db29bb195f5c0c667d3c09f0a.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 30, 2024, 9:19pm UTC](https://forum.inductiveautomation.com/t/tree-view-auto-sorting/96634/2 "2024-09-30T21:19:48Z")

</div>

The built-in sorting of the component isn't smart enough to sort numbers in a "human" order rather than lexicographically, but you can work around that without too much trouble.

If you add a custom property to the tree view, make that your "raw" dataset property, and then add an expression binding to the tree view's main data property that calls the [`sortDataset`](https://www.docs.inductiveautomation.com/docs/8.1/appendix/expression-functions/advanced/sortDataset) expression function, you can achieve a more useful result:  
`sortDataset({Root Container.Tree View.raw}, "text", true, true)`

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/b/9bdc65a15e4162651cdc056e946e7febe27b69a5.png)
