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
140
UltraComboEditor displays ValueMember instead of DisplayMember
posted

Why UltraComboEditor shows ValueMember instead of DisplayMember when DisplayMember is DBNull or even string.Empty ?

DataTable dt = new DataTable();
dt.Columns.Add("id", typeof(int));
dt.Columns.Add("name", typeof(string));
dt.Rows.Add(new object[] { 0, string.Empty });
ultraComboEditor1.DataSource = dt.DefaultView;
ultraComboEditor1.ValueMember = "id";
ultraComboEditor1.DisplayMember = "name";
ultraComboEditor1.Value = 0;

How to avoid this?

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    You will probably have to use a single space character. The control interprets null or an empty string as the lack of a matching value.

Children