<?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: SetNamedNodeProperty fails when on active view</title><link>https://www.infopathdev.com:443/forums/thread/14302.aspx</link><pubDate>Sat, 18 Feb 2006 09:13:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14302</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14302.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14302</wfw:commentRss><description>Hi Sam, &lt;br /&gt;Welcome to the Forum!&lt;br /&gt;I think View switch happens only after the control is passed to the InfoPath.&lt;br /&gt;Call XDocument.SetNamedNodeProperty in "OnSwitchView()" event, then it should work.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;INFOPATHdev India</description></item><item><title>SetNamedNodeProperty fails when on active view</title><link>https://www.infopathdev.com:443/forums/thread/12778.aspx</link><pubDate>Fri, 17 Feb 2006 22:10:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12778</guid><dc:creator>Sam Bogart</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12778.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12778</wfw:commentRss><description>I have a number of functions that use the XDocument.SetNamedNodeProperty method to switch the active row on a view that uses the master-detail layout.  If the code is switching &lt;b&gt;to&lt;/b&gt; that view, then calling the XDocument.SetNamedNodeProperty method, everything is fine.&lt;br /&gt;&lt;br /&gt;However ... if the user is already on one of the master-detail views, the XDocument.SetNamedNodeProperty method does &lt;b&gt;not&lt;/b&gt; work at all.  I verified this by calling the XDocument.GetNamedNodeProperty, and it always returns 1!&lt;br /&gt;&lt;br /&gt;I've tried putting a call to XDocument.View.ForceUpdate() in, but this does not appear to help at all.&lt;br /&gt;&lt;br /&gt;I tried adding a call to XDocument.View.SwitchView at the beginning of the function, but I ran into the limitation that there can only be one switchview call in a single business logic block.&lt;br /&gt;&lt;br /&gt;Any ideas would be appreciated.</description></item></channel></rss>