# TreeView: Selection lost

**URL:** <https://forum.inductiveautomation.com/t/treeview-selection-lost/92789>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [July 4, 2024, 7:19am UTC](https://forum.inductiveautomation.com/t/treeview-selection-lost/92789 "2024-07-04T07:19:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marko](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@Marko](https://forum.inductiveautomation.com/u/Marko)\
**Post date:** [July 4, 2024, 7:19am UTC](https://forum.inductiveautomation.com/t/treeview-selection-lost/92789/1 "2024-07-04T07:19:52Z")

</div>

Hello all

On my page I have a tree view. The source is dynamic and serialized at runtime. When I select an item the selection property is correct set:

```python
[
  "1/0/0"
]

```

The moment I stop the preview mode (to design mode) and go back to preview mode the selection is not shown within the tree even though the selection property is still correct set. Do you have any advice or is this a known bug?

PS: I can also reproduce this behavior by just placing the tree view and use the example data.

 ![Screenshot 2024-07-04 at 09.14.52](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/1/510220c48080bf49e1eeddb9ea2588090663e5d3.png)

---

<div class="post-metadata">

**Author:** ![Marko](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@Marko](https://forum.inductiveautomation.com/u/Marko)\
**Post date:** [July 25, 2024, 6:21am UTC](https://forum.inductiveautomation.com/t/treeview-selection-lost/92789/2 "2024-07-25T06:21:14Z")

</div>

No ideas? Still facing the same issue...

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [July 25, 2024, 6:29am UTC](https://forum.inductiveautomation.com/t/treeview-selection-lost/92789/3 "2024-07-25T06:29:49Z")

</div>

Is it only in the designer ?

---

<div class="post-metadata">

**Author:** ![Marko](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@Marko](https://forum.inductiveautomation.com/u/Marko)\
**Post date:** [July 25, 2024, 6:38am UTC](https://forum.inductiveautomation.com/t/treeview-selection-lost/92789/4 "2024-07-25T06:38:11Z")

</div>

In the Designer and the Browser

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [July 25, 2024, 6:39am UTC](https://forum.inductiveautomation.com/t/treeview-selection-lost/92789/5 "2024-07-25T06:39:41Z")

</div>

Can you describe the behavior of what happens in the browser ?  
In the first post you only mention going in and out of preview mode, which doesn't apply to browsers.

---

<div class="post-metadata">

**Author:** ![Marko](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@Marko](https://forum.inductiveautomation.com/u/Marko)\
**Post date:** [August 6, 2024, 3:25pm UTC](https://forum.inductiveautomation.com/t/treeview-selection-lost/92789/6 "2024-08-06T15:25:58Z")

</div>

Opening the web page and clicking inside the tree view the selection is set, like on the picture above. When I do a reload of the page the selection is not shown even though the selection property shows correct values.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 9, 2024, 11:04am UTC](https://forum.inductiveautomation.com/t/treeview-selection-lost/92789/7 "2024-08-09T11:04:43Z")

</div>

I've seen this same behavior. No help for it, that I know of.
