Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

InfoPath, VSTA, & C# startup Q

  Asked By: Nilay    Date: Jul 13    Category: Sharepoint    Views: 1460

I am new to C#, VSTA & InfoPath so I am trying LOTS of simple experiments. From
samples on the WEB, I am trying to execute statements like:
Xdocument.DOM.singlenodeselection .....

From other posts I have found the object model changed from maybe Infopath2003
to 2005/2007, so now one needs to write
XMLdocument.singlenodeselection ...

OK OK. BUT I cannot get an XMLdocument reference to the current instance of the
open form. In 2003 they did it in "startup stub code." VSTA startup stub code
does not return a ref to the current form. I've hunted for 2 weeks on the blogs
and MS site, no luck.

The "this" object and the "this.maindatasource" do not refer to the current open
form. Or if they do, they are clearly not an XMLdocument object.

Yes, I know I can & have tried navigator to get at singlenodeselection, I am
trying to learn to use the XMLdocument object. It somehow seems "cleaner" & more
intuitive (except I can't get it to work).

And, isn't there a subtle difference between the current open form and
maindatasource? Doesn't it have to do with events and when data changes, e.g. on
form vs. xml database?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Abinav Basu     Answered On: Jul 13

I just found  another MSDN article which essentially says:

FORGET YOUR OLD EXAMPLES & WAYS - THEY WON'T WORK. LEARN THE XPATHNAVIGATOR.

 
Didn't find what you were looking for? Find more on InfoPath, VSTA, & C# startup Q Or get search suggestion and latest updates.




Tagged: