Selecting TreeGrid records programmatically

Example:

TreeGrid DataSource has the following fields defined: ID, ParentID, Name

The TreeGrid widget only has Name displayed.

If, from an external source, I was given a value for ID, how can I search through my TreeGrid Datasource, identify the LGR that has a matching ID, and finally, programmatically “select” this record in my TreeGrid.

Thanks for any input.

See the APIs on Tree, which you can access via getTree().

Thanks -

So it looks like I can use Tree.find(“ID”, PARTICULAR_ID) which returns a TreeNode. Looking at TreeNode, I do not see anything that can mark it as “selected”. Did I miss a method in TreeGrid or ListGrid? e.x. TreeGrid.setSelected(TreeNode)

ListGridRecord and TreeNode are in reality the same object and are interconvertable.