Hi,
What you are describing is the default behavior of the UltraCombo. If it's not doing that, you must have changed something. Maybe you set DropDownWidth to something other than the default.
I'm not sure about the UltraComboEditor, but you might want to check the documentation on DropDownWidth. There are certain settings like 0 and -1 that have special meanings.
Hi Jamal,
Ah, I think I misunderstood your question. The width of the dropdown is based on the combined width of it's columns. So it's not the width of the dropdown itself you need to adjust - you want to adjust the width of the columns to fit the data.
You do this with the PerformAutoResize method of the column. You can call this method on each of the two visible columns inside the InitializeLayout event. Just be sure to use the proper overload and specify AllRowsInBand.
I'm pretty sure that the UltraComboEditor does this automatically. Or perhaps it's a DropDownWidth setting.
The above post is referring to UltraComboEditor, not UltraCombo.
For UltraCombo, you need to resize the columns and the dropdown will size itself by default so that all of the columns show.
To resize the columns in the combo to their contents, you can use the PerformAutoResize method on the column (and loop through and call it on each column) or the PerformAutoResizeColumns method on the band or DisplayLayout. The InitializeLayout event is generally a good place to do this.
This doesn't work for me. I have an UltraCombo bound to an Object. DropDownWidth is -1. It's not as wide as my data.
To clarify for anyone ele having this issue:
Setting DropDownListWidth to -1 should solve this issue and allow you to see all data no matter the width. (UltraComboEditor)
by default the value is 0 and does not show all the data in the drop down by default.
-Thanks Mike