Hi.
I have an UltraCombo that is assigned to a grid cell EditorControl. Everything works as planned, except for one thing: The UltraCombo grid column does not auto size to the drop down.
I have tried setting the relevant AutoSize on the column and AutoFitStyle on the control without luck.
What am I missing here?
Best regards,
Goran
Hi Goran,
I don't understand what you are asking. Why would the column in the grid size itself to the dropdown? That does not make sense. The dropdown shows multiple columns and there is no relation between those columns and their widths and the grid column width.
The UltraCombo shows ONE column as I want to display it as 'normal' drop down. This column should span the entire width of the UltraCombo, otherwise it looks strange (when selecting items, the selection is cropped at the column border). No matter what I do, I cant accomplish this.
So I am not trying to resize the main grid column, I am trying to resize the drop down grid column.
Any suggestions?
Hi,
Okay... so what are you trying to autosize the column to? AutoSize means setting the width of the column based on the contents so you make sure all of the text in the column is visible to the user with no scrollbars. Is that what you want?
Or are you trying to make the column in the dropdown (and thus the dropdown itself) the same width as the grid column it's in?
Also... may I ask why you are using an UltraCombo? There are easier ways to provide a list in a grid cell.
Hm... are you saying that the dropdown is showing extra space in addition to the width of the column?
The default behavior of the combo is to size the DropDown to the columns automatically. So if you are getting extra space it's because you changed something.Like maybe you are setting the DropDownWidth property on the Combo. That's not what you need in this case, though. What you should do, instead, is change the width of the Column in the dropdown and let the dropdown itself size to the column - which it will do automatically unless you also changed the AutoSizeMode.
Yes, exactly. I need for the drop down to auto size to the container cell, and I need the drop down column to auto sixe to the drop down width.
Trying with the BeforeCellListDropDown now, will report on result.
Okay... May I ask why you are using an UltraCombo for this? I can't get this to work with an UltraCombo, but UltraCombo is actually not the most efficient way to provide a dropdown list in a grid cell.
If you use UltraDropDown and assign it to the column's ValueList, instead, it's very easy:
this.ultraDropDown1.DropDownWidth = 0;this.ultraDropDown1.DisplayLayout.AutoFitStyle = AutoFitStyle.ResizeAllColumns;
As I understand it, the UltraDropDown does not support Suggest functionality when used as EditorControl. So thats why I use the UltraCombo.