<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: TimeZone - How to select the local one</title><link>https://www.infopathdev.com:443/forums/thread/59523.aspx</link><pubDate>Fri, 01 Oct 2010 15:19:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:59523</guid><dc:creator>denfer06</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/59523.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=59523</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;You get the trick, I have selected C#(Infopath 2003 compatible) this is why I got &amp;quot;thisXDocument&amp;quot; instead of &amp;quot;this.MainDataSource&amp;quot;&lt;/p&gt;&lt;p&gt;Thanks for your help &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: TimeZone - How to select the local one</title><link>https://www.infopathdev.com:443/forums/thread/59521.aspx</link><pubDate>Fri, 01 Oct 2010 14:53:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:59521</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/59521.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=59521</wfw:commentRss><description>&lt;p&gt;In my knowledge, on Tools-&amp;gt;form option--&amp;shy;&amp;gt;&amp;nbsp;Programming - if you choose C#, you can use &amp;quot;this.MainDataSource&amp;quot;, if you choose C#(Infopath 2003 compatible), you have thisXDocument.&lt;/p&gt;</description></item><item><title>Re: TimeZone - How to select the local one</title><link>https://www.infopathdev.com:443/forums/thread/59518.aspx</link><pubDate>Fri, 01 Oct 2010 14:47:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:59518</guid><dc:creator>denfer06</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/59518.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=59518</wfw:commentRss><description>&lt;p&gt;Hello&lt;/p&gt;&lt;p&gt;Thanks for the tips &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;I also develop on C# and when I select Tools-&amp;gt; Programming -&amp;gt; visual studio Tools for applications it opens the VS 2005 version&lt;/p&gt;&lt;p&gt;&amp;nbsp;I have both VS 2005 and 2008 installed on my computer&lt;/p&gt;&lt;p&gt;Why I don&amp;#39;t have the &amp;quot;this.MainDataSource&amp;quot; available ? &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: TimeZone - How to select the local one</title><link>https://www.infopathdev.com:443/forums/thread/59515.aspx</link><pubDate>Fri, 01 Oct 2010 14:25:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:59515</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/59515.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=59515</wfw:commentRss><description>&lt;p&gt;Hi, I program on C# that&amp;#39;s why I use&amp;nbsp; &amp;quot;this.MainDataSource&amp;quot;, when you program on C# 2003 you have to use thisXDocument.DOM. I suggest you to make a condition if(thisXDocument.IsNew) to set your value, because if someone change the value, when i reoppen the form, the value will reinitialize.&lt;/p&gt;</description></item><item><title>Re: TimeZone - How to select the local one</title><link>https://www.infopathdev.com:443/forums/thread/59461.aspx</link><pubDate>Thu, 30 Sep 2010 07:24:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:59461</guid><dc:creator>denfer06</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/59461.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=59461</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hello&lt;/p&gt;&lt;p&gt;Thanks for the solution&lt;/p&gt;&lt;p&gt;It&amp;#39;s what I did :&lt;/p&gt;&lt;p&gt;[InfoPathEventHandler(EventType = InfoPathEventType.OnLoad)]&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void FormEvents_OnLoad(DocReturnEvent e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.thisXDocument.DOM.selectSingleNode(&amp;quot;/my:Job/my:Definition/@my:TimeZoneID&amp;quot;).text = TimeZone.CurrentTimeZone.StandardName;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.thisXDocument.DOM.selectSingleNode(&amp;quot;/my:Job/my:Definition/@my:HandoffTimeZoneID&amp;quot;).text = TimeZone.CurrentTimeZone.StandardName;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/p&gt;&lt;p&gt;One more question&lt;/p&gt;&lt;p&gt;I don&amp;#39;t understand why I don&amp;#39;t have &amp;quot;this.MainDataSource&amp;quot; available&lt;/p&gt;&lt;p&gt;I&amp;#39;m Using InfoPath 2007 and I only have thisXDocument or thisApplication available&lt;/p&gt;&lt;p&gt;Do you know Why ? &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: TimeZone - How to select the local one</title><link>https://www.infopathdev.com:443/forums/thread/59420.aspx</link><pubDate>Wed, 29 Sep 2010 13:54:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:59420</guid><dc:creator>Potemkine</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/59420.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=59420</wfw:commentRss><description>&lt;p&gt;HI, a solution is to add some code on load of the form, and assign a value to your field if the form if new.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (this.New)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Globalization.CultureInfo info = System.Globalization.CultureInfo.CurrentCulture;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.MainDataSource.CreateNavigator().SelectSingleNode(&amp;quot;&amp;quot;).SetValue(info.LCID.ToString());&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;</description></item><item><title>TimeZone - How to select the local one</title><link>https://www.infopathdev.com:443/forums/thread/59415.aspx</link><pubDate>Wed, 29 Sep 2010 09:32:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:59415</guid><dc:creator>denfer06</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/59415.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=59415</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hello&lt;/p&gt;&lt;p&gt;I have a drop down list that list all TimeZone&lt;/p&gt;&lt;p&gt;I want to select by default the local one&lt;/p&gt;&lt;p&gt;How I can do that ? &lt;/p&gt;&lt;p&gt;the form can be opened in different country.&lt;/p&gt;&lt;p&gt;Note that my list contain the WindowsId that can be used once the local time zone has been found, to select the correct entry in the Drop down list &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Regards &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>