Hi,
I have TcxColorComboBox with NamingConvention=cxncX11 and PrepareList=cxplX11Ordered. When selected value is i.e Yellow when you click combo, popup list shows YellowGreen. It's really confusing, it seems Yellow value is not available any more. Attached screenshot.
Hello Raimundas,
I've tried to replicate the issue, but failed. Perhaps, I've missed something. I've attached a simple example and a video to demonstrate how it all works on my side. Please take a look at them.
The problem is when you open the form and color is already selected i.e. data stored in database. If you change the value the selected value auto goes into remember list and is selected correctly upon combo popup.
I've modified your sample to reproduce the issue. To reproduce run application and click combo. Incorrect value will be selected.
Thank you for the clarification. I will forward this issue to our developers for further research.
Hi,
I don't know how far your developers are on solving this, of course, but I've also run into this issue. While looking into it, I've noted the following:
- At some point, while initializing the colorcombobox (in my case inline in a tableview), the text of the colorcombobox is filled with the name of the color, i.e. 'Yellow'.
- This causes TcxCustomTextEditLookupData.TextChanged to be executed.
- This method then uses TcxCustomTextEditLookupData.InternalLocate to update the ItemIndex property of the LookupData.
- However the InternalLocate method seems to have been written to find the first close match, not an actual match. It searches for the first item that starts with the sought name, not the one that exactly matches it. Since 'YellowGreen' has a lower index in the X11 ordered list than 'Yellow' and it starts with 'Yellow', that item is found and set as active item in the lookup data.
- Note that only the X11Ordered list has this problem. The Delphi list and the HTML list don't have this problem because those lists do not contain names that are also the first part of other names. The "unordered" X11 list is sorted alphabetically, which means that the partials, like 'Yellow' and 'Lime' are always encountered before the longer ones, such as 'YellowGreen' and 'LimeGreen'.
Hopefully this post will help the developers locate and fix this issue.
With regards.
Hello Remco,
Thank you for your comment. We will consider it.