I'm currently using an UltraTree (2008.1) and I've populated a ValueList with data. I assign the ValueList to a column, and then the UltraTree decides that it is going to use an EditorWithCombo embedded control on the Tree. The EditorWithCombo it puts in allows the user to type text into it and select from the list. I cannot have the user typing things into the cell, I only want them to select from a list. So I tried setting the EditorWithCombo.DropDownStyle, but the property is read only.
I also tried setting "EditorWithCombo.TextBox.ReadOnly = True"
Any suggestions on what I should do?
There are two solutions to this problem:
1) Explicitly assign an UltraComboEditor control to the column's EditorControl property, and set the UltraComboEditor's DropDownStyle property to 'DropDownList'
2) Explicitly assign an EditorWithCombo to the column's Editor property, using a custom DefaultEditorOwner-derived implementation to tell the editor to behave as a dropdown list.
Example:
myColumn.Editor = new EditorWithCombo( new MyEditorOwner() );
private class MyEditorOwner : DefaultEditorOwner{ public override bool MustSelectFromList(object ownerContext) { return true; }}
Thanks Brian, that worked exactly how I expected.