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)
Hi Tony,
If that's happening, then it's clearly a bug. What version of the grid are you using?
Can you post a small sample project demonstrating the behavior?
v9.2.20092.2049
If I have some time, I'll see if I can isolate it.
To be sure I'm clear - the column headers are sizing, but I am also displaying the band header (immediately above the column headers) and it's that that is not resizing. It ends up being the same width as the sum of all the column headers.
tonyB.
Now you lost me. That does not sound possible. Can you post a screen shot? Just go to the options tab and attach an image file to your post here on the forum and it will show up in your post.