How to select table Row without click action?

Hi There,

I have created Tree Table using gojs here is my code Code Pen

I know I can select any Row by clicking on it or by setting isSelected = true for node that I wanted to select.

I want know how can make any Row selected when I render Tree table.
What I mean is when I render tree table below is the result I get
image

in this image no row is selected and this is expected behavior.

But to select any row I have to click on it and then for clicked node isSelected prop becomes true. I want to select row when I render this tree table diagram. Because I have usecase where I need to select Row and then refresh or re-render tree table diagram in that case I m loosing the selected row because of refresh and I do have selected row information somewhere else even after the refresh. Using that information I want to programmatically set selected row that was selected previously.

I hope my question is clear enough.
Please advice how can I do this? Thanks in advance

Your CodePen doesn’t make use of the enhancements that Jon made in Node background color selection issue - GoJS - Northwoods Software (nwoods.com)

For the case that you propose, I suggest that you add a data property to each node data object that indicates whether or not the row should be highlighted. Adapt the code that draws the background rectangle for each row to check that data property instead of Node.isSelected.