<?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: drop down list with Infopath 2007</title><link>https://www.infopathdev.com:443/forums/thread/34767.aspx</link><pubDate>Mon, 24 Nov 2008 05:07:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34767</guid><dc:creator>Anuma</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34767.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=34767</wfw:commentRss><description>&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;Hello,&lt;/font&gt;&lt;/p&gt;&lt;font face="Times New Roman" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;"&gt;&lt;font face="Times New Roman" size="3"&gt;XPath button will be displayed if you select the second or third option under the “List Box Entries”. It will be displayed beside of the “Entries” text box.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: drop down list with Infopath 2007</title><link>https://www.infopathdev.com:443/forums/thread/34765.aspx</link><pubDate>Mon, 24 Nov 2008 04:36:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34765</guid><dc:creator>soju.ss</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34765.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=34765</wfw:commentRss><description>&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;font face="Calibri" size="3"&gt;Sorry I am not getting XPath button on InfoPath 2007. If I double click the dropdown button, I am getting property window. &lt;span style="mso-spacerun:yes;"&gt;&amp;nbsp;&lt;/span&gt;Could you please little elaborate the above steps?&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: drop down list with Infopath 2007</title><link>https://www.infopathdev.com:443/forums/thread/34756.aspx</link><pubDate>Sat, 22 Nov 2008 14:03:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34756</guid><dc:creator>BuildPro Guru</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34756.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=34756</wfw:commentRss><description>&lt;p&gt;You will have to sort the entries at the data source.&amp;nbsp; Just arrange the data in the table the way that you want to see it in the dropdown.&amp;nbsp; If you want to limit the items that show up in the dropdown, you can apply filters to acccomplish that.&amp;nbsp; Double click the dropdown, click the xpath button for the entries, click the &amp;quot;filter data&amp;quot;&amp;nbsp;button at the bottom of the dialog box and set up your filters there.&lt;/p&gt;</description></item><item><title>Re: drop down list with Infopath 2007</title><link>https://www.infopathdev.com:443/forums/thread/34753.aspx</link><pubDate>Sat, 22 Nov 2008 03:57:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34753</guid><dc:creator>soju.ss</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34753.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=34753</wfw:commentRss><description>&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Yes correct. The InfoPath page having lot of complicated cascading. So i wanted to populate certain values and wanted to sort dropdown items.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Do you know how to sort dropdown list items&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Thanks&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: drop down list with Infopath 2007</title><link>https://www.infopathdev.com:443/forums/thread/34727.aspx</link><pubDate>Fri, 21 Nov 2008 16:28:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34727</guid><dc:creator>BuildPro Guru</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34727.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=34727</wfw:commentRss><description>&lt;p&gt;First, you have to create a data connection to whatever source that you want to use to populate the dropdown.&amp;nbsp; In design mode, go to tools -&amp;gt; data connections -&amp;gt; add.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Select &amp;#39;recieve&amp;#39; and click next.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Select the type of data source that you are connecting to.&amp;nbsp; Click next.&lt;/p&gt;
&lt;p&gt;Continue on with the wizard until you have set up your connection.&lt;/p&gt;
&lt;p&gt;Doubl click your dropdown.&lt;/p&gt;
&lt;p&gt;Select &amp;#39;look up values from an external data source&amp;#39;&lt;/p&gt;
&lt;p&gt;Select your data source from the dropdown.&lt;/p&gt;
&lt;p&gt;Select your entries.&lt;/p&gt;
&lt;p&gt;If you need to, specify your field/values.&lt;/p&gt;
&lt;p&gt;Click OK and preview your form.&lt;/p&gt;</description></item><item><title>Re: drop down list with Infopath 2007</title><link>https://www.infopathdev.com:443/forums/thread/34719.aspx</link><pubDate>Fri, 21 Nov 2008 16:05:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34719</guid><dc:creator>soju.ss</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34719.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=34719</wfw:commentRss><description>&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;I have created a c# datatable. I need to populate the dropdown with information from the database, because it a demo project and future I need to populate from database and sharepoint list. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;With help of &lt;b style="mso-bidi-font-weight:normal;"&gt;setvalue&lt;/b&gt; property I have populated in text box.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Thanks&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Times New Roman" size="3"&gt;Soju &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: drop down list with Infopath 2007</title><link>https://www.infopathdev.com:443/forums/thread/34715.aspx</link><pubDate>Fri, 21 Nov 2008 15:40:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34715</guid><dc:creator>BuildPro Guru</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34715.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=34715</wfw:commentRss><description>&lt;p&gt;Are you trying to populate the dropdown with information from the database or are you trying to write the information from the dropdown into the database?&lt;/p&gt;</description></item><item><title>Re: drop down list with Infopath 2007</title><link>https://www.infopathdev.com:443/forums/thread/34712.aspx</link><pubDate>Fri, 21 Nov 2008 15:34:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34712</guid><dc:creator>soju.ss</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34712.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=34712</wfw:commentRss><description>Pls help ............</description></item><item><title>drop down list with Infopath 2007</title><link>https://www.infopathdev.com:443/forums/thread/34701.aspx</link><pubDate>Fri, 21 Nov 2008 14:49:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:34701</guid><dc:creator>soju.ss</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/34701.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=34701</wfw:commentRss><description>&lt;p&gt;&amp;nbsp; Hi,&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;I have created a datatable and &amp;nbsp;wanted to map one of the field with dropdown list in Infopath 2007. But it is not populating, Pls review the code and correct me .....&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Full source code&lt;/p&gt;
&lt;p&gt;using Microsoft.Office.InfoPath;&lt;/p&gt;
&lt;p&gt;using System;&lt;/p&gt;
&lt;p&gt;using System.Xml;&lt;/p&gt;
&lt;p&gt;using System.Xml.XPath;&lt;/p&gt;
&lt;p&gt;using System.Collections;&lt;/p&gt;
&lt;p&gt;using Microsoft.Office.Interop.InfoPath.SemiTrust;&lt;/p&gt;
&lt;p&gt;using System.Data;&lt;/p&gt;
&lt;p&gt;namespace sojutest&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;public partial class FormCode&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;public XDocument thisXDocument;&lt;/p&gt;
&lt;p&gt;// Member variables are not supported in browser-enabled forms.&lt;/p&gt;
&lt;p&gt;// Instead, write and read these values from the FormState&lt;/p&gt;
&lt;p&gt;// dictionary using code such as the following:&lt;/p&gt;
&lt;p&gt;//&lt;/p&gt;
&lt;p&gt;// private object _memberVariable&lt;/p&gt;
&lt;p&gt;// {&lt;/p&gt;
&lt;p&gt;// get&lt;/p&gt;
&lt;p&gt;// {&lt;/p&gt;
&lt;p&gt;// return FormState[&amp;quot;_memberVariable&amp;quot;];&lt;/p&gt;
&lt;p&gt;// }&lt;/p&gt;
&lt;p&gt;// set&lt;/p&gt;
&lt;p&gt;// {&lt;/p&gt;
&lt;p&gt;// FormState[&amp;quot;_memberVariable&amp;quot;] = value;&lt;/p&gt;
&lt;p&gt;// }&lt;/p&gt;
&lt;p&gt;// }&lt;/p&gt;
&lt;p&gt;// NOTE: The following procedure is required by Microsoft Office InfoPath.&lt;/p&gt;
&lt;p&gt;// It can be modified using Microsoft Office InfoPath.&lt;/p&gt;
&lt;p&gt;public void InternalStartup()&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;EventManager.FormEvents.Loading += new LoadingEventHandler(FormEvents_Loading);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;public void FormEvents_Loading(object sender, LoadingEventArgs e)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;ArrayList sortValues = new ArrayList();&lt;/p&gt;
&lt;p&gt;XPathNavigator xnDoc = this.MainDataSource.CreateNavigator();&lt;/p&gt;
&lt;p&gt;XPathNavigator xnStatus = xnDoc.SelectSingleNode(&amp;quot;/my:myFields/my:field1&amp;quot;, this.NamespaceManager);&lt;/p&gt;
&lt;p&gt;xnStatus.SetValue(&amp;quot;test&amp;quot;);&lt;/p&gt;
&lt;p&gt;// IXMLDOMNodeList DropDownValueNodeList = thisXDocument.DOM.selectNodes(&amp;quot;/my:myFields/my:field2&amp;quot;);&lt;/p&gt;
&lt;p&gt;//foreach (IXMLDOMNode DropDownValueNode in DropDownValueNodeList)&lt;/p&gt;
&lt;p&gt;//{&lt;/p&gt;
&lt;p&gt;// sortValues.Add(thisXDocument.DOM.selectSingleNode(&amp;quot;&amp;quot;).text);&lt;/p&gt;
&lt;p&gt;//}&lt;/p&gt;
&lt;p&gt;//sortValues.Sort();&lt;/p&gt;
&lt;p&gt;DataTable table = new DataTable();&lt;/p&gt;
&lt;p&gt;//Create 7 columns for this DataTable&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;DataColumn col1 = new DataColumn(&amp;quot;ID&amp;quot;);&lt;/p&gt;
&lt;p&gt;DataColumn col2 = new DataColumn(&amp;quot;Name&amp;quot;);&lt;/p&gt;
&lt;p&gt;DataColumn col3 = new DataColumn(&amp;quot;Checked&amp;quot;);&lt;/p&gt;
&lt;p&gt;DataColumn col4 = new DataColumn(&amp;quot;Description&amp;quot;);&lt;/p&gt;
&lt;p&gt;DataColumn col5 = new DataColumn(&amp;quot;Price&amp;quot;);&lt;/p&gt;
&lt;p&gt;DataColumn col6 = new DataColumn(&amp;quot;Brand&amp;quot;);&lt;/p&gt;
&lt;p&gt;DataColumn col7 = new DataColumn(&amp;quot;Remarks&amp;quot;);&lt;/p&gt;
&lt;p&gt;//Define DataType of the Columns&lt;/p&gt;
&lt;p&gt;//col1.DataType = System.Type.GetType(&amp;quot;System.Int&amp;quot;);&lt;/p&gt;
&lt;p&gt;//col2.DataType = System.Type.GetType(&amp;quot;System.String&amp;quot;);&lt;/p&gt;
&lt;p&gt;//col3.DataType = System.Type.GetType(&amp;quot;System.Boolean&amp;quot;);&lt;/p&gt;
&lt;p&gt;//col4.DataType = System.Type.GetType(&amp;quot;System.String&amp;quot;);&lt;/p&gt;
&lt;p&gt;//col5.DataType = System.Type.GetType(&amp;quot;System.Double&amp;quot;);&lt;/p&gt;
&lt;p&gt;//col6.DataType = System.Type.GetType(&amp;quot;System.String&amp;quot;);&lt;/p&gt;
&lt;p&gt;//col7.DataType = System.Type.GetType(&amp;quot;System.String&amp;quot;);&lt;/p&gt;
&lt;p&gt;//Add All These Columns into DataTable table&lt;/p&gt;
&lt;p&gt;table.Columns.Add(col1);&lt;/p&gt;
&lt;p&gt;table.Columns.Add(col2);&lt;/p&gt;
&lt;p&gt;table.Columns.Add(col3);&lt;/p&gt;
&lt;p&gt;table.Columns.Add(col4);&lt;/p&gt;
&lt;p&gt;table.Columns.Add(col5);&lt;/p&gt;
&lt;p&gt;table.Columns.Add(col6);&lt;/p&gt;
&lt;p&gt;table.Columns.Add(col7);&lt;/p&gt;
&lt;p&gt;//Create a Row in the DataTable table&lt;/p&gt;
&lt;p&gt;DataRow row = table.NewRow();&lt;/p&gt;
&lt;p&gt;//Fill All Columns with Data&lt;/p&gt;
&lt;p&gt;row[col1] = &amp;quot;1100&amp;quot;;&lt;/p&gt;
&lt;p&gt;row[col2] = &amp;quot;Computer Set&amp;quot;;&lt;/p&gt;
&lt;p&gt;row[col3] = true;&lt;/p&gt;
&lt;p&gt;row[col4] = &amp;quot;New computer set&amp;quot;;&lt;/p&gt;
&lt;p&gt;row[col5] = 32000.00;&lt;/p&gt;
&lt;p&gt;row[col6] = &amp;quot;NEW BRAND-1100&amp;quot;;&lt;/p&gt;
&lt;p&gt;row[col7] = &amp;quot;Purchased on July 30,2008&amp;quot;;&lt;/p&gt;
&lt;p&gt;//Add the Row into DataTable&lt;/p&gt;
&lt;p&gt;table.Rows.Add(row);&lt;/p&gt;
&lt;p&gt;DataRow row1 = table.NewRow();&lt;/p&gt;
&lt;p&gt;row1[col1] = &amp;quot;1100&amp;quot;;&lt;/p&gt;
&lt;p&gt;row1[col2] = &amp;quot;Computer Set&amp;quot;;&lt;/p&gt;
&lt;p&gt;row1[col3] = true;&lt;/p&gt;
&lt;p&gt;row1[col4] = &amp;quot;New computer set&amp;quot;;&lt;/p&gt;
&lt;p&gt;row1[col5] = 32000.00;&lt;/p&gt;
&lt;p&gt;row1[col6] = &amp;quot;NEW BRAND-1100&amp;quot;;&lt;/p&gt;
&lt;p&gt;row1[col7] = &amp;quot;Purchased on July 30,2008&amp;quot;;&lt;/p&gt;
&lt;p&gt;table.Rows.Add(row1);&lt;/p&gt;
&lt;p&gt;XPathNavigator xnStatus1 = xnDoc.SelectSingleNode(&amp;quot;/my:myFields/my:field4&amp;quot;, this.NamespaceManager);&lt;/p&gt;
&lt;p&gt;xnStatus1.SetValue(&amp;quot;&amp;quot;);&lt;/p&gt;
&lt;p&gt;XPathNavigator templateNode = xnStatus1.Clone();&lt;/p&gt;
&lt;p&gt;foreach (DataRow dr in table.Rows)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;XPathNavigator newNode = templateNode.Clone();&lt;/p&gt;
&lt;p&gt;string value = dr[0].ToString();&lt;/p&gt;
&lt;p&gt;newNode.SetValue(value);&lt;/p&gt;
&lt;p&gt;xnStatus.SetValue(dr[0].ToString());&lt;/p&gt;
&lt;p&gt;xnStatus1.SetValue(dr[0].ToString());&lt;/p&gt;
&lt;p&gt;xnStatus1.InsertAfter();&lt;/p&gt;
&lt;p&gt;xnStatus1.InsertBefore();&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Soju   &lt;/p&gt;</description></item></channel></rss>