Tree View selectedItem Binding Bug

Ignition 8.1.17
Vision Component: Tree View

I ran into a strange issue (bug) using the tree view component. The selectedItem property is not being updated when referenced in a binding.

To recreate this issue, do the following in a new window:

  • Add tree view component with a simple query binding of:
SELECT 'East Area/Refrigeration' AS [path], 'Compressor1' AS [text]
UNION
SELECT 'East Area/Refrigeration' AS [path], 'Compressor2' AS [text]
UNION
SELECT 'East Area/Process' AS [path], 'Valve1' AS [text]
UNION
SELECT 'East Area/Process' AS [path], 'Valve2' AS [text]
UNION
SELECT 'West Area/Process' AS [path], 'Valve1' AS [text]
UNION
SELECT 'West Area/Process' AS [path], 'Valve2' AS [text]
  • Add a Numeric Label with the Value property bound to the tree view selectedItem property.
  • Create a custom property on the tree view called rowID and bind it to selectedItem.

Run in the designer and select an item. The numeric value and selectedItem match.
Close and save the window.
Open the window.
The Numeric Label Value property, rowID, and the tree view selectedItem property do not match. The numeric label and rowID still retains the old value when the window was saved and does not update until a new selection is made in the tree view.

When the window opens, the selectedItem in the properties window for the tree view indicates a correct value of -1 and is expected. Other components bound to this return the old value.

This is still an issue, however, in order to complete my project I started over and scripted the window in the project library eliminating the binding issue.

1 Like