thisXDocument - ??? - InfoPath Dev
in

InfoPath Dev

thisXDocument - ???

Last post 01-15-2009 11:25 PM by utkarsh2012. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 12-27-2006 01:36 AM

    thisXDocument - ???

    Can someone explain me, what is "thisXDocument" in C# code of infopath form. When I create an event handler (for example "OnLoad") I don`t see any thisXDocument object !!! Need I create it ???
    Best regards,
    Alexander Ekzarov
    Kyiv, Ukraine
    silverlightnet.blogspot.com
  • 12-27-2006 02:30 AM In reply to

    When you create a C# project, InfoPath and Visual Studio add some code by default to formcode.cs that defines this variable.
    Patrick Halstead
    Project Manager at Qdabra
  • 12-27-2006 03:16 AM In reply to

    Below source of my formcode.cs...
    I don`t see any thisXDocument...
    I use MS Visual Studio 2005 and Infopath 2007...
    Maybe there some another interface? If so, are there some docs about this ???

    // Source of formcode.cs
    using Microsoft.Office.InfoPath;
    using System;
    using System.Xml;
    using System.Xml.XPath;
    using System.Net.Mail;

    namespace temp
    {
    public partial class FormCode
    {
    // Member variables are not supported in browser-enabled forms.
    // Instead, write and read these values from the FormState
    // dictionary using code such as the following:
    //
    // private object _memberVariable
    // {
    // get
    // {
    // return FormState["_memberVariable"];
    // }
    // set
    // {
    // FormState["_memberVariable"] = value;
    // }
    // }

    // NOTE: The following procedure is required by Microsoft Office InfoPath.
    // It can be modified using Microsoft Office InfoPath.
    public void InternalStartup()
    {

    }
    }
    }
    Best regards,
    Alexander Ekzarov
    Kyiv, Ukraine
    silverlightnet.blogspot.com
  • 12-27-2006 03:19 AM In reply to

    Hi,
    XDocument contains an XDocument object for each Microsoft Office InfoPath 2003 form that is currently open. The XDocument object represents a form's underlying XML document and can be used to interact with the XML data that a form contains. and this XDocument object can be used in any number of forms and to identify this we alias it as thisXDocument in the present InfoPath form we are using.

    Hope this help you!
    Shilpa
    INFOPATHDEV India
  • 12-27-2006 03:48 AM In reply to

    Ok. Thanks. But where can I get a reference to this object in my case?
    Best regards,
    Alexander Ekzarov
    Kyiv, Ukraine
    silverlightnet.blogspot.com
  • 12-27-2006 05:53 AM In reply to

    Hi,
    This you can see it in MS Visual Studio 2003 and Infopath 2005 by default but not in MS Visual Studio 2005 and Infopath 2007 but we can define it explicitly even in this to call any single node or DOM...

    Hope this helps you!
    Shilpa
    INFOPATHDEV India
  • 01-15-2009 09:38 PM In reply to

    can we access xdocument of a different form from the current form?

    Actually i need to submit DATA of a form to another form ( with a different form template)

    How can i achive it?

    Thanks

  • 01-15-2009 10:51 PM In reply to

    Greg did a sample once that did this, but I believe it requires starting one form from within the other and passing the XDocument pointer to it as part of the start up parameters. Then you can communicate back and forth between them. You will need code to do this.

    Patrick Halstead
    Project Manager at Qdabra
  • 01-15-2009 11:25 PM In reply to

    Hey Patrick, thanks for the reply

    I have a detailed description of my problem here: http://www.infopathdev.com/forums/p/10373/37159.aspx#37159

    Any suggestions?

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