Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
395
Automatic column sizing
posted

Hi,

I have an issue with autosizing of UltraTree.

I have object with several properties bound to DataSource of some bindingSource. This binding source is bound to DataSource of UltraTree. In design mode I made all properties but one invisible. The tree generates just fine and looks simple:

- Text

     - Text

     - Text

- Text

When I use ViewStyle as Outlook Express and set:

ColumnSettings.AutoFitColumns = AutoFitColumns.ResizeAllColumns

the Tree looks as I expect and its width is expanded to parent Control.

Problem is with ViewStyle = Grid.

The tree is generated ok, but the width of the column is set to some default value. I could not find any property that says to column in node to expand so all text in cells are shown to the user.

Anyway I found some samples how to fix it with:

UltraTreeNodeColumn.PerformAutoResize();

And here comes the problem:

Now my tree looks fine, shows even longer texts, but also it shows Label. So I set:

UltraTreeColumnSet.LabelPosition = NodeLayoutLabelPosition.None;

And with this all resizing is gone. I was trying to set up various properties with various values but with no success.

Is there a way to do automatic column sizing in UltraTree with ViewStyle=Grid and no Labels displayed?

Parents Reply Children