Hi
I'm using an UltraCombo .
I'd like to creat a multi-select ultra Combo, this control is used to select multiple items but this works not fine when the combo is dropped down, in the combo i just selected only one line.
I've already tried to override this behaviour by clearing the text selection and setting the caret to the end in the MultiSelectDropDown1.List.Items event like webform. But this does not help. i'm newbie in winform :(
Is there another way to do this?
Thanks in advance!
Hi,
What version of the controls are you using?
The UltraCombo never supported multiple selection until jus recently. This is a new feature that was added in NetAdvantage for WinForms 2009 Vol. 1, I think. So if you are using an older version, then it could not have worked. Unless maybe you used the sample code from this article:
HOWTO:Creating a Multi-Select Dropdown Combo for the WinGrid
Mike,
I've created a form with Splitter Panel. Bottom half of panel has Ultra Grid and upper half has Ultra Combo. All work well until I add the following line of code:
Me.cboJobCodeList.CheckedListSettings.EditorValueSource = Infragistics.Win.EditorWithComboValueSource.CheckedItems
When this line is added, and you close the dropdown you see the selections: 1120, 1145, 1160But you cannot move focus to another control. You cannot even click the X to close the application. If I comment out the line after selecting multi lines and closing up the dropdown I can move focus to other objects, but you only see the last item selected: 1160
I've bound it to a datasource and used the following code.
cboJobCodeList.InitializeLayout
)
checkColumn.DataType =
checkColumn.Header.VisiblePosition = 0
checkColumn.Header.CheckBoxVisibility =
.Always
checkColumn.Header.Caption =
.Empty
.cboJobCodeList.CheckedListSettings.CheckStateMember = checkColumn.Key
.CheckedItems
.Item
","
"prjb_code"
Sub
Well, if the Value of the control is not bound, then the only other possibility is that you have set LimitToList to true and when you select multiple items, they are not matching up to the items on the list. This is most likely a problem with the data types the DataValues or the DisplayTexts on the list.
The value property nor display property is not bound. The datasource is bound to a dataset and the datamember is bound to datatable within the dataset. The datatable has four columns and I'm adding the unbound "Selected" column at runtime.
After your comment about the bound field that is unable to handle the value made me check one other thing. If I select just one check box in the list it will let me move focus. If I select more than one it will not.
There is no logic for validation within my code.
It sounds like something is preventing the focus from leaving the control. This is usually caused by validation, as in the Validating event.
Are you binding the Value property of the UltraCombo? If so, it's probably bound to a field that is unable to handle the value you are giving it, which in this case would be an array of objects.
If that's not the case, then you might want to check the Validating event and see if the e.Cancel parameter is being set to true for some reason. Check the e.Cancel even if you are not already handling the event - it might be coming into the event already set to false if someone else is cancelling it.
If none of that helps, see if you can duplicate this behavior in a small sample project and attach it here (you can attach files on the options tab), and we will be happy to take a look.