Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
310
UltraComboEditor displays ValueMember instead of DisplayMember
posted

Hi all!!!

We are experiencing a really... but really really strange behaviour... Here is the code we use:

//MyItem is class with the following structure
//string Key;
//string It;
//string Fr;

Globals.CurrentLanguage = "It";

ArrayList listNations = new ArrayList();
listNations.Add(new MyItem("IT","Italy","Italia");
listNations.Add(new MyItem("FR","France","Francia");

Combo.DataSource = listNations;
Combo.ValueMember = "Key";
Combo.DisplayMember = Globals.CurrentLanguage;
Combo.DataBindings.Add(new Binding("Value", this.oBinding, "Country", true));


The problem is... when we load the binding... in our combo, instead of displaying France... we read FR ...
In the list we can see Italy and France... If I then select France from the list... France is also displayed in the textbox... But after clicking Apply (saving dataset), FR is displayed back...

The strange... but really really strange thing is that we use the same code for another combo... and there is working without any problem...

HELP PLEASE!!!