<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: why my secondary datasource loose entry?</title><link>https://www.infopathdev.com:443/forums/thread/13950.aspx</link><pubDate>Thu, 10 Nov 2005 09:41:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13950</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13950.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13950</wfw:commentRss><description>Salut Franck,&lt;br /&gt;&lt;br /&gt;J'ai eu de la peine à comprendre ou tu voulais en venir mais je crois que j'y suis arrivé!&lt;br /&gt;&lt;br /&gt;Thanks for your reply! so like you say I have modify my code :&lt;br /&gt;&lt;pre&gt;IXMLDOMNode Old = thisXDocument.DOM.selectSingleNode("/Essai/Muster");&lt;br /&gt;string essai = thisXDocument.DOM.selectSingleNode("/Essai/Choice").text;&lt;br /&gt;string condition = "/Essai/Muster[@id='"+ essai +  "']";&lt;br /&gt;IXMLDOMDocument2 oDomSearchHRG = (IXMLDOMDocument2)thisXDocument.GetDOM("muster");&lt;br /&gt;string Newdata = oDomSearchHRG.selectSingleNode(condition).xml;&lt;br /&gt;			&lt;br /&gt;IXMLDOMDocument2 toto = (IXMLDOMDocument2)thisXDocument.CreateDOM();&lt;br /&gt;toto.loadXML(Newdata);&lt;br /&gt;Old.parentNode.replaceChild(toto.selectSingleNode("/Muster"), Old);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That work great now!&lt;br /&gt;&lt;br /&gt;In your meaning :&lt;br /&gt;Is it my code good or I can make some improvement?&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;&lt;br /&gt;Thierry&lt;br /&gt;&lt;br /&gt;Every moment hesitated is a moment gone for life!!! Think about it</description></item><item><title>Re: why my secondary datasource loose entry?</title><link>https://www.infopathdev.com:443/forums/thread/13949.aspx</link><pubDate>Wed, 09 Nov 2005 17:59:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13949</guid><dc:creator>franck</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13949.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13949</wfw:commentRss><description>Salut Thierry,&lt;br /&gt;&lt;br /&gt;Why are you trying to overwrite a node in your main DOM by a node from your Secondary DOM.  Have you tried to read the info from your secondary DOM and just set value within your main DOM?  In addition, this way, it would be easier to debug as you could step through values before applying them to your DOM.&lt;br /&gt;&lt;br /&gt;Am I missing something here?&lt;br /&gt;&lt;br /&gt;Franck</description></item><item><title>why my secondary datasource loose entry?</title><link>https://www.infopathdev.com:443/forums/thread/12668.aspx</link><pubDate>Wed, 09 Nov 2005 15:54:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12668</guid><dc:creator>Coita Thierry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12668.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12668</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;A very strange things is happen to my form.&lt;br /&gt;&lt;br /&gt;I have one view with one secondary datasource.&lt;br /&gt;&lt;br /&gt;I have a dropdown listbox that is link to my secondary datafield&lt;br /&gt;&lt;br /&gt;value : ID &lt;br /&gt;Display: Text&lt;br /&gt;&lt;br /&gt;If I select a text on my listebox I have a one afterchangeevent:&lt;br /&gt;&lt;pre&gt;if (e.IsUndoRedo)&lt;br /&gt;	{return;}&lt;br /&gt;if (e.Source.nodeType != DOMNodeType.NODE_TEXT)&lt;br /&gt;	{return;}&lt;br /&gt;if(e.Site != e.Parent)&lt;br /&gt;	{return;}&lt;br /&gt;if ("Insert"!= e.Operation)&lt;br /&gt;	{return;}		&lt;br /&gt;IXMLDOMNode Old = thisXDocument.DOM.selectSingleNode("/Essai/Muster");&lt;br /&gt;string essai = thisXDocument.DOM.selectSingleNode("/Essai/Choice").text;&lt;br /&gt;string condition = "/Essai/Muster[@id='"+ essai +  "']";&lt;br /&gt;IXMLDOMDocument2 oDomSearchHRG = (IXMLDOMDocument2)thisXDocument.GetDOM("muster");&lt;br /&gt;IXMLDOMNode New = oDomSearchHRG.selectSingleNode(condition);&lt;br /&gt;Old.parentNode.replaceChild(New, Old);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and in the return I have the id displayed in the listebox and not text! If I select another item in my listebox the previous is nomore here! If I select all the item of the listebox one by one in the end I have nothing in my listebox! &lt;br /&gt;&lt;br /&gt;I can send you the form if you don't understand or you wan't to see! send me a mail!&lt;br /&gt;&lt;br /&gt;I think the problem is when I do the replace node! but why he erase New from the secondary datasource?&lt;br /&gt;&lt;br /&gt;Any idea? &lt;br /&gt;&lt;br /&gt;Thanks a lot for your comments!&lt;br /&gt;&lt;br /&gt;++&lt;br /&gt;&lt;br /&gt;Thierry&lt;br /&gt;&lt;br /&gt;Every moment hesitated is a moment gone for life!!! Think about it</description></item></channel></rss>