How can I get and set properties from objects in form on InfoPath 2007? - InfoPath Dev
in

InfoPath Dev

How can I get and set properties from objects in form on InfoPath 2007?

Last post 06-06-2008 02:33 AM by ALEXEY. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-30-2008 07:59 AM

    • ALEXEY
    • Not Ranked
    • Joined on 05-30-2008
    • Posts 3

    How can I get and set properties from objects in form on InfoPath 2007?

    How can I get and set properties from objects in form on InfoPath 2007? For example, I want set Text property of TextBox after clicking button.

    using Microsoft.Office.InfoPath;

    using System;

    using System.Xml;

    using System.Xml.XPath;

    namespace Script

    {

    public partial class FormCode

    {

    public void InternalStartup()

    {

    ((
    ButtonEvent)EventManager.ControlEvents["CTRL12_5"]).Clicked += new ClickedEventHandler(CTRL12_5_Clicked);

    }

    public void CTRL12_5_Clicked(object sender, ClickedEventArgs e)

    {

          //What can I do here?

    }

    }

    }

     

    Where this cod execute? In server or in client?

  • 06-03-2008 07:33 AM In reply to

    Re: How can I get and set properties from objects in form on InfoPath 2007?

    These are the basics to put a value in a field

     

    XPathNavigator xn = this.MainDataSource.CreateNavigator();XPathNavigator xnfield1 = xn.SelectSingleNode("/my:myFields/my:field1", this.NamespaceManager);

    xnfield1.SetValue("test");

     

    I do suggest you read a book first though.

  • 06-06-2008 02:33 AM In reply to

    • ALEXEY
    • Not Ranked
    • Joined on 05-30-2008
    • Posts 3

    Re: How can I get and set properties from objects in form on InfoPath 2007?

     Thanks! Unfortunately, I have no time now to read books...

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