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
590
Setting UltraCombo.Value does not select corresponding item
posted

I have an UltraCombo on a form.  I have created a binding source for the class of objects I want to display, and have set the datasource on the ultraCombo to my binding source.  I have defined the ValueMember and the DisplayMember.

At run time I add items to my binding source, and finally try to set the initially selected item.  I set the Value property of my ultraCombo, but the corresponding item does not display in the combo box UNTIL the user drops it down.  At that point it is clear that the correct item is selected in the dropped down list, and if the user closes the drop down list by clicking somewhere else on the form, the combo box shows the correct item.  The behavior is the same if I try setting the SelectedRow property instead of the Value property.

What do I need to do to see the initially selected item?

Parents
  • 590
    posted

    Further discovery: I was using an UltraCalcManager to concatenate two string columns to create the value for the computed DisplayMember column.

     When I use a regular property-backed column for the DisplayMember everything works as expected. I speculate that the ultraCalcManager is not creating the strings until too late.  The computed column is hidden, and only used for display when the combo box is not dropped down.  What voodoo should I invoke to make the ultraCalcManager do it job on initial population?

Reply Children