Combobox Databinding in VS 2003

Posts   
 
    
joshmouch
User
Posts: 34
Joined: 02-Dec-2004
# Posted on: 21-Dec-2004 19:16:20   

With the newest LLBLGen generator, I generate some self servicing code.

I reference the generated code, adding the collections to my toolbox.

I drag a collection to the form, creating a databindable instance.

I select a combobox, select the DataSource property, see the collection listed as an option (listed twice, actually). I select it...... nothing happens. The DataSource property remains "(none)", instead of being the collection I selected.

Any idea why?

joshmouch
User
Posts: 34
Joined: 02-Dec-2004
# Posted on: 21-Dec-2004 19:47:57   

Also, if I set the comboboxe's datasource in code like so:

cbbidcompany.DataSource = Me.TblCustCollection1

The DataSource property remains equal to Nothing (null).

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 22-Dec-2004 10:35:57   

Hmm, very weird, I never saw this, but I always tested grids, not comboboxes. I'll try a combobox. Winforms I pressume?

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 22-Dec-2004 17:14:24   

I can't reproduce it. (I've tried selfservicing, if you use adapter please let me know, also if you use some custom extension template).

If I drag a CustomerCollection onto a form, and a combobox, I can set the datasource to the customercollection. The datamember can't be set to a collection, obviously, but I can set it to for example Orders.CustomerId.

Frans Bouma | Lead developer LLBLGen Pro
joshmouch
User
Posts: 34
Joined: 02-Dec-2004
# Posted on: 23-Dec-2004 15:37:39   

Hmm....

The combo I'm using that doesn't work is actually an auto-complete combo that inherits from combobox. If I use a regular combobox, the databinding seems to work, just as you found.

Guess I'll have to find a new auto-complete combobox control. wink