<?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: Appending values into dropdown list</title><link>https://www.infopathdev.com:443/forums/thread/12066.aspx</link><pubDate>Mon, 26 Mar 2007 07:34:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12066</guid><dc:creator>anandhienator</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12066.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=12066</wfw:commentRss><description>Hi Matt,&lt;br /&gt;&lt;br /&gt;I checked out the article named "Populate a Drop-Down List Box via code." Well.. I tried the example and it worked. But the only problem is that, even though the values could be seen by the user into the dropdown, the user is unable to see the selected value. After the user selects the value he is interested in, user sees a blank only... &lt;br /&gt;&lt;br /&gt;Please help. :)&lt;br /&gt;Regards,&lt;br /&gt;Anandhi</description></item><item><title>Re: Appending values into dropdown list</title><link>https://www.infopathdev.com:443/forums/thread/12065.aspx</link><pubDate>Thu, 22 Mar 2007 16:50:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12065</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12065.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=12065</wfw:commentRss><description>Hi Anandhi,&lt;br /&gt;&lt;br /&gt;Check out these HowTos:&lt;br /&lt;a target="_blank" href=http://infopathdev.com/howto/tutorials/default.aspx?s=Lists&gt;http://infopathdev.com/howto/tutorials/default.aspx?s=Lists&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Specifically this one:&lt;br /&gt;Populate a Drop-Down List Box via Code&lt;br /&lt;a target="_blank" href=http://infopathdev.com/howto/tutorials/default.aspx?i=987250af134b4ced85cbddc7db724202&gt;http://infopathdev.com/howto/tutorials/default.aspx?i=987250af134b4ced85cbddc7db724202&lt;/a&gt;</description></item><item><title>Appending values into dropdown list</title><link>https://www.infopathdev.com:443/forums/thread/11773.aspx</link><pubDate>Wed, 21 Mar 2007 13:04:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:11773</guid><dc:creator>anandhienator</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/11773.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=11773</wfw:commentRss><description>Hi All,&lt;br /&gt;&lt;br /&gt;I want to add values into the dropdownlist present on the infopath form at run time thru managed code. How can i do so ? I tried cloning the root and then appending the new child to the root. The code snippet is as follows :&lt;br /&gt;&lt;br /&gt;while (rdr.Read())//read through rows&lt;br /&gt;            {&lt;br /&gt;                sqlConnection2.Open();&lt;br /&gt;                string T_Id = rdr[2].ToString();&lt;br /&gt;                string cmdTxt = "select distinct TaskId,TaskName from MainTaskTB where TaskId=" + T_Id + " order by TaskId";&lt;br /&gt;&lt;br /&gt;                cmd = new SqlCommand(cmdTxt);&lt;br /&gt;                cmd.Connection = sqlConnection2;&lt;br /&gt;&lt;br /&gt;                rdr1 = cmd.ExecuteReader();&lt;br /&gt;                while (rdr1.Read())&lt;br /&gt;                {&lt;br /&gt;                    temp = root.Clone();&lt;br /&gt;                    temp2 = temp;&lt;br /&gt;                    &lt;br /&gt;                    temp3 = temp2.SelectSingleNode("/my:myFields/my:WorkAssignedDetails/my:MainTask", this.NamespaceManager);&lt;br /&gt;                    DeleteNil(temp3);&lt;br /&gt;                    temp3.SetValue(rdr1[1].ToString());&lt;br /&gt;                    &lt;br /&gt;                }&lt;br /&gt;                //temp.AppendChild(temp2);&lt;br /&gt;                temp.InsertAfter(temp2);&lt;br /&gt;            }&lt;br /&gt;                    root.DeleteSelf();&lt;br /&gt;&lt;br /&gt;I am getting an error after the "temp.InsertAfter(temp2)" saying that "Schema validation has non-datatype errors". For this, infopath team blogs gave me a solution saying to add a function called "DeleteNil(paramater)". I did that too but still facing the same error.&lt;br /&gt;&lt;br /&gt;Awaiting reply soon. &lt;br /&gt;Regards,&lt;br /&gt;Anandhi</description></item></channel></rss>