selectNode fails after switchView

G

GGian

I have a small piece of code that gets called form my custom task pane. This
code is supposed to change the current view and then select a certain node
within the form. I have two buttons, (button1)one just switches the view and
(button2)the other switches the view and selects a node. If i click button2,
then it will switch the view but then fail when SelectNodes is called.
Strangely, if i click button1 and then button2 then button2 works as
expected. Is there some problem with switching views and selecting a node in
the same function? I have attached the code i use for slecting a node below.
Thanks for your help.
-Greg G

IXMLDOMNode tmpNode = thisXDocument.DOM.selectSingleNode( "//"+nodeName);
thisXDocument.View.SelectNodes(tmpNode,Type.Missing,Type.Missing);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top