<?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>Passing form data-source to custom control</title><link>https://www.infopathdev.com:443/forums/thread/39817.aspx</link><pubDate>Sun, 22 Mar 2009 15:01:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39817</guid><dc:creator>Yonatann</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39817.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=43&amp;PostID=39817</wfw:commentRss><description>Hi,
I have a requirement to develop custom control  (I&amp;#39;m using C#) which is a drop down list
that get its possible entries from some web service , and let the user choose a single option (with auto-complete/type ahead functionality).

I&amp;#39;ve implemented this requirement successfully with one exception: The control is calling the WS explicitly instead of receiving the data from a form data source. 

How can I pass a data source from the form to my control? XML Node binding is not suitable since my control&amp;#39;s value is nothing but single string (the chosen option) and the incoming data is repeating (a list of options).

Any idea or workaround? Can I pass a datasource to a control property? I can see that the built-in drop down list control has an option to specify a data source which will retrieve the possible entries – how can I develop such a thing?

Thanks.</description></item></channel></rss>