Setting selection property of tree component programmatically does not apply selectedStyle

Hi everyone,

In my perspective view I am using Tree component.
I have selectedStyle class applied which turns the background of selected node as blue.
This works well until I set the "selection" property and expand the node(s) programmatically in which case the selectedStyle does not get applied.

I was expecting that after i set the selection property and expand the nodes the selected node will have the "selectedStyle" applied to it but this is not happening.

I'll appreciate any suggestion in this regard.

Thanks,
Ajay