we load a Ultracombo from an xml file with all 50 U.S. states. 2 columns, abbreviation and full name.
_dsLoad.ReadXml(Application.StartupPath + "\\XML\\States.xml"); cboState.DataSource = _dsLoad.Tables[0]; cboState.DisplayMember = "Abbr"; cboState.ValueMember = "State";
because the data is imperfect, sometimes IN will come over and sometimes INDIANA will.
cboState.Value = "INDIANA" will be fine
cboState.Value ="IN" will not.
Is there a way to set the value based on the displaymember value? I can read the string coming in and decide there if it's abbr or Name, then set the value or dsiplaymembervalue.
So there is a such thing as a dumb question. Thank you for your help :)
Hi,
Yes, if you are setting a DisplayMember Value, what you do is set the Text property on the control instead of the Value.