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
935
UltraComboEditor display text when dropped down
posted

Hi,

I am trying to generate a derived UltraComboEditor that shows a different text version when collapsed and dropped down, effectively having more detail when dropped down. I populated a combo box with ValueListItems with the detailed text as the display text. This shows when dropped down. Then I used a datafilter to remove this extra detail in the EditorToDisplay direction.

This works to display the detailed text when dropped down and the reduced text when item is selected. But when trying to move off the control, the combo selects the null item (presumably based on the text not matching any valuelist items) Also, I've set it to LImitToList, so the control now won't lose focus.

Is there a way to have two different versions of the display text to be used? Also, is there a sample of a dataFilter applied to an UltraComboEditor as I can find no articles for this.

Thanks

Wendy

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Wendy,

    I don't think that the approach you are taking (using a DataFilter) will work. The DataFilter is going to get called and change the DisplayText and that text is not going to match any values on the list, so that's probably why you are getting nulls.

    What you really need here is a way to change the display of the combo when it is dropped down without affecting the text or value.

    If you are allowing your users to type into the UltraComboEditor, then I don't see any way to make this work. When the control goes into edit mode, it displays a TextBox control over itself by default and there is no way to change the display of that TextBox without changing it's text.

    But, if you are setting DropDownStyle to DropDownList, which prevents the user from typing, then the control does not use a TextBox and you might be able to get what you want using a CreationFilter. The CreationFilter (or possibly a DrawFilter) will let you change the text of the UIElements which display on the screen without affecting the actual value or text of the control.

Children