Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Help with Combobox Binding...going round in circles

$
0
0

Folks,

I am having trouble updating a dataset with selected values from a combobox.

My application loads 1 record at a time from a database and stores it in a datatable.

I have a Combobox bound to a particular field in this datatable (cb.databindings.add(Text,dt,"FIELD")

I would like to be able to select a value from my Item collection (Itemsource) and update the bound FIELD (datasource)

Here is my problem

Each time a record is loaded the Combobox shows an empty value (the FIELD) is unpopulated at this point. I then select a Value and update the datatable.

I work through several records sequentially this way

However when I (later) reload a record that was previously updated, the value displayed in the combobox is a previous (different) records selection.

In essence I have 2 related problems/questions

a) The Combobox is retaining a previous value from another record editted earlier

b) The combobox is not showing the updated value from the related underlying datatable

I realise I've not supplied any code in detail but hope one of the more experienced here will recognise the issue and be able to help?

Many thanks



Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>