<?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>Controls</title><link>https://www.infopathdev.com:443/forums/43.aspx</link><description> </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Select value in DropDownList</title><link>https://www.infopathdev.com:443/forums/thread/58192.aspx</link><pubDate>Fri, 20 Aug 2010 09:29:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:58192</guid><dc:creator>Ramesh.N</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/58192.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=58192</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;k this fine. I need one more thing in dropdownlist. when we look up external values from an external datasource for dropdown.The first values is blank.Do have any idea to avoid this.pls let me know if you have any idea.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Select value in DropDownList</title><link>https://www.infopathdev.com:443/forums/thread/19286.aspx</link><pubDate>Sun, 22 Apr 2007 19:34:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:19286</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/19286.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=19286</wfw:commentRss><description>&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;font face="Times New Roman"&gt;Hi,&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;font face="Times New Roman"&gt;You need to change&amp;nbsp;the your code as below:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;font face="Times New Roman"&gt;Dim oVendordDOM&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;font face="Times New Roman"&gt;Set oVendordDOM = XDocument.GetDOM( &amp;quot;VENDOR_BASIC&amp;quot; )&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;font face="Times New Roman"&gt;//Set the property&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;font face="Times New Roman"&gt;&lt;strong&gt;oVendordDOM.setProperty(&amp;ldquo;SelectionNamespaces&amp;rdquo;, &amp;ldquo;Give Secondary DOM namespace&amp;rdquo;)&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;font face="Times New Roman"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;font face="Times New Roman"&gt;Dim myNode&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;font face="Times New Roman"&gt;Set myNode = oVendordDOM.selectSingleNode(&amp;quot;//d:VENDOR_BASIC[@VENDOR_ID = &amp;#39;&amp;lt;someid&amp;gt;&amp;#39;]&amp;quot;)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;br /&gt;&lt;font face="Times New Roman"&gt;Dim vendorId&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;font face="Times New Roman"&gt;//Get the drop down list node using complete xpath of main&amp;nbsp;DOM&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;"&gt;&lt;font face="Times New Roman"&gt;Set vendorId = XDocument.DOM.selectSingleNode&lt;strong&gt;(&amp;quot;Give complete Xpath of the drop down list box&amp;quot;)&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:10pt;font-family:'Times New Roman';"&gt;vendorId.text = myNode.text&lt;/span&gt;</description></item><item><title>Re: Select value in DropDownList</title><link>https://www.infopathdev.com:443/forums/thread/12087.aspx</link><pubDate>Wed, 11 Apr 2007 14:23:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12087</guid><dc:creator>milos</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12087.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=12087</wfw:commentRss><description>Thanks for the prompt answer.&lt;br /&gt;Actually I do not want to set first node as default. &lt;br /&gt;&lt;br /&gt;I want to set default value according to some criteria. Here is my pseudo code (&amp;lt;someid&amp;gt; is my criteria):&lt;br /&gt;&lt;br /&gt;Dim oVendordDOM&lt;br /&gt;Set oVendordDOM = XDocument.GetDOM( "VENDOR_BASIC" )&lt;br /&gt;    &lt;br /&gt;Dim myNode&lt;br /&gt;'select node from secondary data source based on vendor_id&lt;br /&gt;&lt;b&gt;'!****** I am not sure that this XPath is correct&lt;/b&gt;&lt;br /&gt;Set myNode = oVendordDOM.selectSingleNode("//d:VENDOR_BASIC[@VENDOR_ID = '&amp;lt;someid&amp;gt;']")&lt;br /&gt;&lt;br /&gt;'set value in dropdown list&lt;br /&gt;Dim vendorId&lt;br /&gt;Set vendorId = XDocument.DOM.selectSingleNode("//my:VendorIdQ")&lt;br /&gt;&lt;b&gt;'!****** This code actually adds another item in dropdown list&lt;/b&gt;&lt;br /&gt;vendorId.text  = myNode.text&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Select value in DropDownList</title><link>https://www.infopathdev.com:443/forums/thread/12086.aspx</link><pubDate>Wed, 11 Apr 2007 13:45:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12086</guid><dc:creator>K.Ramana Reddy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12086.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=12086</wfw:commentRss><description>Hi milos, Welocme to the forum and you are right, this is a right place to know about the infopath.&lt;br /&gt;&lt;br /&gt;Check out this link, may be helpful for you,&lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://infopathdev.com/forums/topic.asp?TOPIC_ID=2775&gt;http://infopathdev.com/forums/topic.asp?TOPIC_ID=2775&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Select value in DropDownList</title><link>https://www.infopathdev.com:443/forums/thread/11781.aspx</link><pubDate>Wed, 11 Apr 2007 12:51:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11781</guid><dc:creator>milos</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11781.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=11781</wfw:commentRss><description>I have a dropdown list connected with secondary data source (external SQL Server database).&lt;br /&gt;Secondary data source contains two attribute fields:&lt;br /&gt;- VENDOR_ID&lt;br /&gt;- VENDOR_NAME&lt;br /&gt;&lt;br /&gt;By default, dropdown list does not have default value so I have to select some value from the list.&lt;br /&gt;&lt;br /&gt;Is it possible to programmatically set default value of the dropdown list to certain item?&lt;br /&gt;For example I would like to set dropdown list value to the first or second vendor from the recordset.&lt;br /&gt;&lt;br /&gt;PS: This is my first post. I found lot of usefull information on your site. You are doing very good job with this portal! &lt;br /&gt;I will recommend it to everyone. I think It is mandatory location for every InfoPath developer.</description></item></channel></rss>