Selecting of nodes


how do I highlighting a number of nodes that are related to a node.
I have the following code and it only highlighting 1 node instead of nodes.
in my add node function i set the
node.UserObject = someID;
then on my goView_ObjectSingleClicked event I have the following
GoIconicNode n = e.GoObject.TopLevelObject as GoIconicNode;
if(node != null)
string nodeName = node.Text;
foreach (GoObject obj in goView.Document)
GoIconicNode me = obj as GoIconicNode;
if(me != null && me.UserObject.ToString() == nodeName)
can you tell me why it only select 1 node instead of all the nodes? They shoud have the same UserObject id as the text of the node that is being clicked

GoSelection.Select makes its argument the one and only selected object.

Instead you want to do:

but the nodes still do not have the green background as they suppose to.

do I need to refresh or do something to activate the selection layer?

I got it, I called

goView.Selection.OnGotFocus(); right after I add all the node.

Or do goView.Focus().

Or set goView.NoFocusSelectionColor = goView.PrimarySelectionColor.