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
710
UltraCombo - display member
posted

Hi there,

I have an UC that displays two columns from a query.

Question is, how can I have it to use both columns as the selected value?

I mean, to display once selected from the dropdown list, ie Name and Age, separated by a space ?

Thanks in advance!

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi,

    The UltraCombo determines which field on the list to use for it's data and display values by looking at the DataMember and DisplayMember properties, respectively. You can only specify one column for each of these. 

    So if you want the display or value to be the combination of two columns, then you need to create an additional column on the list that contains the combined value. This is pretty easy to do. What you would do is handle the InitializeLayout event of the UltraCombo and add an unbound column. Then you use the InitializeRow event to populate that column's Value with the combination of values from the other columns in the same row. Then you just set the ValueMember or DisplayMember to point to the unbound column.

Children