Accessing Form controls progmatically

  • Thread starter Needo, SharePoint Developer
  • Start date
N

Needo, SharePoint Developer

I have VSTA installed.
My requirement is to change the value of text box, based on the selected
value of dropdown list in info path form. Values are coimg from a webservice
in dropdown list.
So problem is: In the Aftercahge event of dropdown list, i have to get
refrence of textbox (i.e field2) and set its value.

From literature is says something about Maindatasource taht is not present
in my code. If i write this. there is no sucg item.

Any help :(
Thanks
 
K

K.Ramana Reddy(GGK Tech)

Hi,

In OnAfterChange event, you need to set the value like this.
XDocument.DOM.selectSingleNode("field2 Xpath").text=value you need to
change// this is VB script

thisXDocument.DOM.selectSingleNode("field2").text=Give value value you need
to change//this is c#
 

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