Hi,
I would like to hide the drop down button on the UltraCombo. Yes I know it would basically be a text box at that point, but that is what I want. If it is not possible to hide the drop down then maybe someone can tell me how to disable the button or change the button graphic.
Here is why:
There are cases where there are 250,000 records if I don't filter the list. I would like to make it so the user has to type a certain number of characters (let's say 4) before the query is issued that will populate the combo. This allows me to add a where clause to the query so it returns faster (hits an index and returns less rows).
So I don't want the user to see the drop down, try to click it before we have populated the combo. I want them to type 4 characters first, then populate the combo, drop the list and show the first item in the list that matches their 4 typed in characters.
Thanks
Randy
Never mind I figure it out. What I ended up doing is getting the UIElement and disabling it by using the UI CreationFilter.
My case may be slightly unique as I am creating a custom control by inheriting from UltraCombo, but the concept should be the same.
Infragistics.Win.IUIElementCreationFilter
Then when the control is created right after InitializeComponent() I have a line that looks like this:
base.CreationFilter = this;
The inteface implementation looks like this:
#region IUIElementCreationFilter Members public void AfterCreateChildElements(Infragistics.Win.UIElement parent) { if (parent is Infragistics.Win.EditorWithComboUIElement) { Infragistics.Win.EditorWithComboUIElement uiElement = (Infragistics.Win.EditorWithComboUIElement)parent; foreach(Infragistics.Win.UIElement chldElement in uiElement.ChildElements) { if (chldElement is Infragistics.Win.EditorWithComboDropDownButtonUIElement) { chldElement.Enabled = mDropDownEnabled; break; } } } } public bool BeforeCreateChildElements(Infragistics.Win.UIElement parent) { return false; } #endregion
drandy said: Never mind I figure it out. What I ended up doing is getting the UIElement and disabling it by using the UI CreationFilter.
Thanks for sharing your solution. It saved me a bunch of time.
drandy said:Never mind I figure it out. What I ended up doing is getting the UIElement and disabling it by using the UI CreationFilter.
Thanks for sharing drandy, you saved me a lot of fiddling! IMHO this should be a built in feature.