Hi,
I have the following piece of code in my initializelayout event handler
vlst.ValueListItems.Add("Public", "Public")
vlst.ValueListItems.Add("Private", "Private")
.
band.Columns("Type").Style = UltraWinGrid.ColumnStyle.DropDownValidate
i then call a function that perform an auto resize on all the columns.
The problem is when in the resulting grid, the values in the column are empty.
When i choose either of the values from the dropdown in the Type column, the text is partially cut since the col size wqas computed based on the header text and not the dropdown values.
My question is
1) Will performautoresize not take into consideration the longest word in the drop down for computing the col length?
2) Is there a method that will get me the width for a hardcoded text which i can then assign to the column width or to the dropdownlistwidth property of valuelist?
Take a look at the overloads of PerformAutoResize. By default, if you pass in no parameters, it will only size the visible cells. But you can specify all rows in the band or a specific number of rows.
I have a case where all the columns are being sized [using PerformAutoResize(PerformAutoSizeType.AllRowsInBand, true)], but they end up taking less space than the band header
using PerformAutoResize(PerformAutoSizeType.AllRowsInBand, true)