I have an UltraComboEditor where I am dynamically setting the Items that appear in the drop-down depending on the actions of a user.
It has the ChecBoxStyle set to CheckBox and EditorValueSource set to CheckedItems.
I am pre-populating the items with a single item which is correctly being displayed.
When I then select to add a new item to the control it is correctly being added to the items and when I drop down the control it appears in the available list and is correctly checked, but the display of the data in the control when closed does not change, I am wanting both items to be displayed in the control like Item1; Item2. No mater what I do, all I get is Item1 displayed.
What do I have to do in order to get the display to correctly display all the items that are checked in the list?
Regards
Sean
Hello Sean,
I have been investigating into your requirement to add checked items to the UltraComboEditor and have them display in the “top area” of the combo, and at the moment, I am seeing a behavior where you should simply need to add the item to the Items collection of the combo and set the ValueListItem.CheckedState to Checked. I have put together a sample project to test this, and this is working correctly on my end.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version 19.1.20191.150 in Infragistics for Windows Forms 2019.1.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if you have any other questions or concerns on this matter.
UltraComboEditorCheckedItems.zip
Hello Andrew,
Thanks for the response, I was able to finally workout what my issue was. When adding items to the control I was using strings for the displaytext and value. My issue was that the data I was using had the same string in the key value so it was adding the item to the control but would not display the different values.
You can replicate this in your application by changing both instances of :
ValueListItem item = ultraComboEditor1.Items.Add(count, "Item " + count.ToString());toValueListItem item = ultraComboEditor1.Items.Add(0, "Item " + count.ToString());