-
Hi ekzarov,
you can try this: Put a textbox control to your infopath view (if it is the first one the name will be field1)
Now in VS (code) do the following
string strXml = yourXmlNodeObject.xml
XmlDocument myXMLDoc = new XmlDocument();
myXMLDoc.LoadXml(strXml);
//create new xml dom node (reference to your textboxcontrol)
IXMLDOMNode ...
-
Thx man, was exactely what i was looking for
-
Hi all,
i have a drop down list which receives its values via a look up in the form's datasource. the datasource is a textbox which is placed in a repeating section. the point is that some of the textboxes in the repeating section have the same values so that i have many duplicates in my dropdownlist. does anybody know how to get rid of those
thx
-
SOLVED
string myRepeat = thisXDocument.DOM.selectSingleNode(''my:myFields/my:Result/my:Results'').xml;
IXMLDOMDocument oXml = thisXDocument.CreateDOM();
oXml.async = false;
oXml.loadXML(myRepeat);
IXMLDOMNode parentNode = thisXDocument.DOM.selectSingleNode(''my:myFields/my:Result'');
parentNode.appendChild(oXml.documentElement);
-
Hi all, how do I instert/add a repeating/option section including all its controls dynamically and programatically (C#) into my infopath form ?
Thx in advance
-
Hi metnovas,
put this code in your button event (note: C#)
IXMLDOMNode nodePicture = thisXDocument.DOM.selectSingleNode(''my:myFields/my:PicturePath'');
//create new OpenFileDialog object
OpenFileDialog ofdlg = new OpenFileDialog();
ofdlg.Title = ''File Browser'' ; //sets the file dialog box title
ofdlg.InitialDirectory = @''c:\'' ...
-
You are absolutely right Patrick.
If you use the code with a WebService you could at least store the LDAP string in the config file and read it from there to be at least somehow a bit dynamic.
By the way finally got ''your'' book ''Developing Solutions with InfoPath''. Nice piece of paper. I guess it would have helped me a lot when I started ...
-
Hey Linus,
first install the InfoPath toolkit for Visual Studio that you can use managed code for you InfoPath projects. Then put this into the OnLoad event of your form to get the currently logged on users name form AD.
NOTE: This requires to set your form to full trust level.
If you don't want to do so use the code with a ...
-
Solved.
Put textBoxControl.text = thisApplication.ActiveWindow.Caption into the OnContextChange event.
-
Hi all,
I need to show the document tilte under which the form got saved in a textbox control. Is it possible to get this value in the OnLoad event and how ?