Hello,
We are experiencing a layout issue with the UltraDropDown used in a column of a UltraGridWe are trying to automatically resize the columns of the dropdown based on the content of the first 10 rows (which is usually the displayed rows).
The problem is that the dropdown width of the ultradropdown is different between the first time it is opened (which seems to be the correct width), and the subsequent times (it becomes very very large).
Example in attachment, just open the application and in the second column "Combo Column" you will find the dropdown.
Any help would be welcome !
Kind regards,
Michael
Hi Michael,
I ran your sample. But no code in this sample is every AutoSizing a column in the dropdown. You appear to have code in the DropDownInitializeLayout which is supposed to AutoSize a column, but you are checking for a column key of "Test" and there is no such column.
I assume you meant to check for the Value column, so I changed the code. This has the effect of changing the width of the column from 98 to 91. So it does appear to be working correctly based on the first 10 rows of data
The second time I drop it down, it's getting much bigger. It looks like it's autosizing based on all of the rows. I'm not entirely sure why this is happening, but I think it has something to do with the DropDown's inherent autosizing of the dropdown area. By default, the DropDownWidth property is set to -1, which means the control automatically tries to size the dropdown window to the columns.
I found that if I turn off AutoFitStyle, it works the way you want.
_dropDownColumn.DisplayLayout.AutoFitStyle = AutoFitStyle.None;
Hey Mike,
Changing that setting definitely fixed it for me.
Thanks !