Good afternoon,
we are facing a problem with the UltraComboEditor when it contains checkable items.
What we've set up:
ultraComboEditor1:CheckedListSettings:CheckBoxStyle = Infragistics.Win.CheckStyle:CheckBox.ultraComboEditor1:CheckedListSettings:EditorValueSource = Infragistics.Win.EditorWithComboValueSource:CheckedItems.ultraComboEditor1:CheckedListSettings:ListSeparator = ",".ultraComboEditor1:DropDownStyle = Infragistics.Win.DropDownStyle:DropDownList.
After that we added two items. When we check the first one, the combo presents like that:
All fine. But when we check the second checkbox:
the text inside the comboeditor (not the dropdown) doesn't contains the textvalue of the last entry. This error is reproducable with any number of entries:
It's allways the last checked entry that seems to be ignored.
Has anyone any suggestions?
Kind regards
Just FYI... It looks like the problem is with a caching mechanism within the UltraComboEditor that stores the DataValue of each item. It stores the DataValue when the item is added to the collection. So I can confirm what you are seeing - which is that you can work around the issue by setting the DataValue on the item before you add it to the ValueListItems collection.
Hello Nico,
Thank you for providing a sample application for testing. I am able to reproduce the behavior you described and logged a development issue 257895.
I have created a private case CAS-198133-S3M6M5 and attached this development issue where I will provide you with further information.
Please let me know if you need more information.
Hi Mike,
in my test cases for you i only used simple values - so the DataValue and DisplayText are equal. In our real Application the DataValue contains almost every time a GUID/UUID and the DisplayText something human readable. So we do set both values all the time. But it looks like the bug occures if the DataValue is not set and the DisplayText is set when the ValueListItem is added to the ComboEditor. This behavior is also reproducable in the "ComboCheckBoxItemsReproducable.zip" that i uploaded for you.
I don't know if this is a bug for you or if you say "hey, initialize the control correctly before adding it to the combo.".
Kind regards,
Nico
Thank you for the update that my sample helped you to fix the issue.
Please let me know if you need further assistance.
Hi Nico,
DataValue and DisplayText exist so that you can do something like save an Id value, but show more user-friendly text to the user. If you don't need that ability, and just want each item to have unique text, then the easiest thing to do is set the DataValue on each item, and simply do not set the DisplayText. The DisplayText will resolve to showing the Value if DisplayText is not set. :)