0

I have run into a problem. I have a datagridview and one column that contains DataGridViewComboBoxColumn.

The combobox's datasource is a list that looks something like the following: Apa Arne Mia

When the user enters one combobox and presses the A-key "Apa" will come up as a suggestion. Exactly what i want. The problem is that if the user marks for example the combobox on the row bellow and presses the A-key "Arne" will be suggested. It cycles or shall i say loops through the list. I want that "Apa" should be suggested as the first choice if i press A every time i enter the combox.

Is this problem possible to resolve?

Best Regards Martin

Martin
  • 195
  • 1
  • 12

1 Answers1

0

With out any code it's hard to tell what the error is, however, my theory is that the DataSources for the ComboBoxes are pointing to same instance of one object. If you select a value in one combo box, all are now at this position. So when you go to the second combo box and hit "A" again, it will move to the next A-word in the list.

You may need to instantiate the object, that is providing the data source to the combos, for each combo box so each one has its own list - instead of pointing to the same place in memory.

If this is not the answer for you, then please provide some code.

blandau
  • 80
  • 1
  • 1
  • 5
  • Thanks for the answer. That was my theory aswell, i will try to bind them in another way. I don't really know what code to post, I do most of the work from the properties window for the datagridview. Thanks again. – Martin Sep 16 '11 at 06:27