Identify InfoPath Controls

J

Jithendrian. R

Hi

i have created a infopath 2007 form which talks to my Service...during the
design of my infopath form i have connected it to my datasource and have also
added it to my form( basically by dragging the datasource object into my form
and it gets me the controls needed like 5 TextBoxes)..i have set default
values to the controls added and also added a submit button and connected it
to my service...

then i have hosted my infopath form in my windows application..
but i need to set a value explicitly to one of my controls which were added
in the design time of my infopath form(say TextBox1)...

i used XpathNavigator from my windows app to get xml code of my infopath
form...but in that code there is no entry for any of my controls which were
added in the design time of my infopath form...

how to refer to the controls added by dragging the datasource object....

need help regarding this...

Thanks

Jithendrian. R
 
G

Greg Collins [InfoPath MVP]

I believe that there is no way to refer to the control itself. As you've seen XpathNavigator is only used for node/data selection.
 
G

Greg Collins [InfoPath MVP]

Keep in mind also that you never set values to a "control", but rather to the "node". Thus the XpathNavigator is the correct tool. You select the "node" that the "control" is bound to, and update the value of that "node". The "control" automatically updates based on the value of the "node".
 
J

Jithendrian. R

Hi Greg

thanks for the reply...

actually i meant the nodes as my controls in my post....i am not able to
refer to my node itself by using the Xpathnavigator in the scenario i have
said....
 
W

willies

Hi, Jithendrian. R
can you tell me about how hosted my infopath form in my windows
application?
can you tell me detail???
can you give me this Demo??
email: (e-mail address removed)
Thanks
willies
 

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