Accessing Infopath Controls - InfoPath Dev
in

InfoPath Dev

Accessing Infopath Controls

Last post 06-04-2008 01:41 AM by Anujahnavi. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 06-04-2008 12:12 AM

    Accessing Infopath Controls

    Hi ,

            I am very new to InfoPath. I need to create a form and send to user through email and the user must fill the form and click submit. Here how can i take the values from or how can I set the values to the controls. That is how can I access the controls like textbox or dropdownlist?

    for ex:

     I want to assign like this.

         Textbox1.Text="some values" (this is not default values.It is a runtime values)

     Please advice me how to handle..

    Thanks all.

    Thiyagarajan N

  • 06-04-2008 12:21 AM In reply to

    Re: Accessing Infopath Controls

    hi,

    U want to access the control and place ur data to that then u can use setvalue property of the control.

    this is the sample: 

     this.CreateNavigator().SelectSingleNode("/my:myFields/my:Hidden", this.NamespaceManager).SetValue("0");

     

    Here iam settign the "Hidden" field which is a textbox value to "0".This is through code in visual studio.

    regards,

    Anu 

     

  • 06-04-2008 01:14 AM In reply to

    Re: Accessing Infopath Controls

    Hi Anu,

    Thanks for your answering. Can you please elaborate your sample code ("this.CreateNavigator().SelectSingleNode("/my:myFields/my:Hidden", this.NamespaceManager).SetValue("0");" ? Where can i set the name for an control (like my:Hidden)?

    then what is my:myfields?

     Thanks,

    Thiyagu.

  • 06-04-2008 01:22 AM In reply to

    Re: Accessing Infopath Controls

    hi,

    my:myFields -> is the main root of the controls in infopath.

    if u  r having myFields/controls/mycontrols/hidden then u have to give

    "my:myFields/my:controls/my:mycontrols/my:hidden. then only u can access the control.

     This is the way of accesssing controls

     

    Regards,

    Anu
     

  • 06-04-2008 01:36 AM In reply to

    Re: Accessing Infopath Controls

    Hi Anu,

              Thanks a lot. Now I am able to handle the controls. But is this the only way to hadle the controls? This is horrible I guess.

    Thanks with Regards,

    Thiyagu

  • 06-04-2008 01:41 AM In reply to

    Re: Accessing Infopath Controls

     i suppose this is the way.but i don't say hat this is the only way.

    I worked with this only.

     

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.