Hi
The UltraComboEditor has a feature to remove the dropdown arrow. My understanding is that the UltraComboEditor can only display one column.
In our application we need the ability to show multiple columns in the combo box. At times the ComboBox has to be Read Only and that's where I need to remove the dropdown arrow.
Is there a easy way to do this or is it trapping some event and taking over the rendering process?
Hi,
What version of the controls are you using?
I'm pretty sure that this was an oversight and that a DropDownButtonDisplayStyle property was added to the UltraCombo to correct this recently. I checked the latest version (v9.2) and the property is there. So if you are using an older version, you might want to consider upgrading to the latest service release. How to get the latest service release - Infragistics Community
If you have an older version and cannot upgrade, then the only way to do this would be to use a CreationFilter to remove the UIElement for the button.
Thanks Mike
we are on V 9.1. getting the latest service release might be the answer
I took a look and it looks like the property was added in v9.2. So the latest service release won't help, you will need to upgrade to the new version or use a CreationFilter.
It's a fairly simple CreationFilter. Here's some sample code I whipped up:
public class RemoveDropDownButtonCreationFilter : IUIElementCreationFilter { #region IUIElementCreationFilter Members void IUIElementCreationFilter.AfterCreateChildElements(UIElement parent) { if (parent is EditorWithComboUIElement) { // Remove the button UIElement editorWithComboDropDownButtonUIElement = parent.GetDescendant(typeof(EditorWithComboDropDownButtonUIElement)); parent.ChildElements.Remove(editorWithComboDropDownButtonUIElement); // Expand the text element to fill the whole control. UIElement editorWithTextUIElement = parent.GetDescendant(typeof(EditorWithTextUIElement)); editorWithTextUIElement.Rect = parent.RectInsideBorders; } } bool IUIElementCreationFilter.BeforeCreateChildElements(UIElement parent) { // Do nothing. return false; } #endregion }