Ideally, I'd like to get my tree to automatically resize its columns based on weights, but that doesn't seem to work in Grid view, so the next best thing would be to do it in code. How can I change the width of a column in code? This ought to be simple, but it's not.
Aaron
Hi,
You could try the following:
foreach (UltraTreeNodeColumn column in ultraTree1.ColumnSettings.RootColumnSet.Columns)
column.PerformAutoResize();
For each column in the columnset call PerformAutoResize Method
Let me know if this works for you.
Regards,
Stefaniya
Thanks, but there's two issues with that: first, won't that affect only one column set? I suppose I could iterate through ColumnSets and do it to each one, but second, what if I don't want to resize the columns to their contents? What I'd actually like is to resize the columns to the width of the tree view control, while controlling the percentage of the width that each one gets. All I need is a SetWidth call, but there doesn't seem to be one.
Thanks, Aaron