comboboxes

M

Marcin Podle¶ny

Hi,

I've a form with three comboboxes. Each of them contains the same data - all
cities in my country. As you see it's a lot of data so it takes a lot of
memory. I'd like to use the same datasource for all three comboboxes but
property Datasource works in different way than I want. It looks like it
copies all data to items of each combobox. So it takes more memory (3 *
items + 1 * datasource) and works slowly.

Is this possible to use (for example) one array and bind three comboboxes to
it? Items property is unfortunately ReadOnly...

Thanks
 
C

CJ Taylor

I can't remember if you can do this successfully with a dataview or not.
Certainly not with a single datasource, because the combo box (or any list
control) uses the .Postion property to note the cursor position.

A Dataview *might* use its own cursor, but I don't think it does (I haven't
done this in a really long time). So you have to create the separate
dataset. give it a shot, if the dataview doesn't work, then no.. can't do
it...
 

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