<?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: populate dropdown during OnLoadEvent</title><link>https://www.infopathdev.com:443/forums/thread/14753.aspx</link><pubDate>Wed, 30 Aug 2006 20:16:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14753</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14753.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14753</wfw:commentRss><description>So glad you got it working! Glad to have helped!&lt;br /&gt;&lt;br /&gt;Keep up the good work!</description></item><item><title>Re: populate dropdown during OnLoadEvent</title><link>https://www.infopathdev.com:443/forums/thread/14752.aspx</link><pubDate>Wed, 30 Aug 2006 10:13:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14752</guid><dc:creator>buki79</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14752.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14752</wfw:commentRss><description>Ok. I figured it out. I create a view in the database with the desired fields and select this view when I create a secondary datasource. So I can bind the e. g. concatenated fields to a field in the primary datasource. &lt;br /&gt;Thanks for hints!</description></item><item><title>Re: populate dropdown during OnLoadEvent</title><link>https://www.infopathdev.com:443/forums/thread/14751.aspx</link><pubDate>Tue, 29 Aug 2006 07:05:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14751</guid><dc:creator>buki79</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14751.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14751</wfw:commentRss><description>Ok. I understand. But how does the drop down know what value to display, when I use managed code to populate the dropdown.&lt;br /&gt;For example, I bind a secondary datasource to the dropdown by the datasource wizard. I add an access database and if I look at the created sql it looks like&lt;pre&gt;select [id],[course_name] from [courses] as [courses]&lt;/pre&gt;&lt;br /&gt;But now I want to use a more complex sql statement within my C# code.&lt;pre&gt;"select c.course_name,c.id "&lt;br /&gt;	+"from courses c, "&lt;br /&gt;	+"     (select count(id) as part, courseID  as cID from course_participants group by courseID) d " &lt;br /&gt;	+"where c.participants &amp;gt;  d.part " &lt;br /&gt;	+"      and c.id = d.cID "&lt;br /&gt;	+"group by c.course_name, c.id"&lt;/pre&gt; How does the dropdown know to be updated correctly? Or how does the sql have to look like in order to work? Do the columns have to be named the same way? And what do I do if I want to populate the dropdown by concatenating the retrieved values, e.g. course name and course id?&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: populate dropdown during OnLoadEvent</title><link>https://www.infopathdev.com:443/forums/thread/14750.aspx</link><pubDate>Tue, 22 Aug 2006 23:24:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14750</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14750.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14750</wfw:commentRss><description>You don't bind the drop-down itself to the repeating element, you right-click your drop-down and choose Properties, and then set it up to be populated from that repeating list.</description></item><item><title>Re: populate dropdown during OnLoadEvent</title><link>https://www.infopathdev.com:443/forums/thread/14749.aspx</link><pubDate>Tue, 22 Aug 2006 08:06:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14749</guid><dc:creator>buki79</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14749.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14749</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;maybe I get something wrong, but when I  look at this secondary data source it is a repeating element. The dropdown list is not a repeating element, so I can't bind the dropdown list to the secondary data source. &lt;br /&gt;When I bind the list entries of the dropdown (properties dialog) to the datasource, only an empty row and the first entry is shown when I open the form. Furthermore when I select the empty row the other empty disappears?&lt;br /&gt;What am I missing?&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Buki</description></item><item><title>Re: populate dropdown during OnLoadEvent</title><link>https://www.infopathdev.com:443/forums/thread/14748.aspx</link><pubDate>Mon, 21 Aug 2006 19:12:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14748</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14748.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14748</wfw:commentRss><description>Hi Buki,&lt;br /&gt;Aren't you binding your dropdown do the "DataObject" that you are querying?&lt;br /&gt;When you do that then it gets automatically updated in the dropdown. You dont need to call forceupdate().</description></item><item><title>populate dropdown during OnLoadEvent</title><link>https://www.infopathdev.com:443/forums/thread/12932.aspx</link><pubDate>Fri, 18 Aug 2006 06:29:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12932</guid><dc:creator>buki79</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12932.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12932</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;I want to populate a dropdown list when the form is openend. The values should appear depending on a select from a database, e. g. only rooms which are not booked should appear in the list.&lt;br /&gt;For this I use the DataObject and submit a query. But as I want to do this in the OnLoadEvent, I can't use forceupdate() to populate the dropdown list. &lt;br /&gt;How do I get the result from the sql select into the dropdown list?&lt;br /&gt;&lt;br /&gt;Thanks in advance.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Buki</description></item></channel></rss>