ActiveX Bindings (not just a single value)

S

SirVader

hi!

i'm trying to write an activex combobox with c# .net,
because i need some features the standard infopath combo has not.

i successfully made this combobox, but i'm not able to bind some kind of
a list to it.
first i thought that it is my combo, but if i add the microsoft forms
2.0 combox i found in the activex controls list i have the same problem.
is there any way to bind complexe data to an activex control?

or has anybody a better idea? everything i want is an autocomplete
combobox for infopath.

thx!
 
S

Scott Roberts [MSFT]

ActiveX controls in InfoPath can bind in one of three ways: to a single
field of a specific type, to a field from a custom namespace, or to a field
or group of any type. For what you are trying to do, if you are trying to
create a list from data in the main datasource, then you want the third type
of binding. This will allow you to bind your control to a repeating group.
However, the work doesn't end there. In the code for your control, you will
need to populate your list from the data in the repeating group to which
your control is bound. This doesn't happen for free unfortunately. This
blog entry might be helpful to you:
http://blogs.msdn.com/infopath/archive/2005/04/15/408728.aspx

If you want to populate your list from a secondary datasource, such as an
XML file, webservice, or database (which is probably your best bet) then you
should bind your control to a single field of a specific type. You will
still need to write code to populate your list from the secondary
datasource.

- Scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top