So I have a UltraComboEditor filled with a list of names pulled from a database, when I add a new name to the database, I want to check that name off in the UltraComboEditor automatically. I assumed that I would change the item's checkstate property, but it's not working. Here is the code I am using:For idx As Integer = 1 To cmbMainCNames.Items.Count - 1 If cmbMainCNames.Items(idx).DataValue = strGlobalCName Then cmbMainCNames.Items(idx).CheckState = CheckState.Checked Exit For End IfNext
After the code runs, I can stop the program and check out the properties for that item and it shows that the 'CheckState' property is indeed 'UnChecked'.
Hello Harris,
Your code is looking correct to me , and CheckState is the correct property to check and uncheck the combo value . Here is the doc for that:
https://ko.infragistics.com/help/winforms/infragistics.win.ultrawineditors~infragistics.win.ultrawineditors.ultracomboeditor~setcheckstate(checkstate)
May be its something related to the event you are using , here is the list of the events been exposed by the UltraComboEditor.
https://ko.infragistics.com/help/winforms/infragistics.win.ultrawineditors~infragistics.win.ultrawineditors.ultracomboeditor_events
I don’t need the code of your datasource but if you can somehow bind the combo with datataable or list and can reproduce the issue then please share your sample for me to have a look and do further investigation.