Hi all, i have a bound tree to a dataset, and i need to set a column size, how can i do this !?
i´m using the latest version of net advantage ( 7,3)
thks
JSB
Thanks Brian, I just noticed that small remark at the bottom of help info too.
So how do you suggest I handle column size issue in Freeform tree? What's the best way to implement auto resize?
To set the header text:
this.ultraTree1.ColumnSetGenerated += new ColumnSetGeneratedEventHandler(ultraTree1_ColumnSetGenerated);void ultraTree1_ColumnSetGenerated(object sender, ColumnSetGeneratedEventArgs e){ UltraTreeNodeColumn column = e.ColumnSet.Columns[0]; column.Text = "Whatever";}
There is no way to auto-size columns except when using the OutlookExpress ViewStyle:
this.ultraTree1.ColumnSettings.AutoFitColumns = AutoFitColumns.ResizeAllColumns;
I have a similar problem: a WinTree control that's bound to a BindingList.
There is only one column. Per default this column is much to small and the text in the column header says "Value". As you can imagine I want that single column to use the whole width of the WinTree control - some kind of autosize - and I want to set the header text to a meaningful text.
How can I do these things? Any help will be highly appreciated.
Best regards, Gerald
Hello JSB,
I've noticed you need to get to the LayoutInfo of an UltraTreeNodeColumn and set the PreferredLabelSize (not the PreferredCellSize...) similar to the following:
this.ultraTree1.ColumnSettings.ColumnSets[0].Columns[1].LayoutInfo.PreferredLabelSize = new Size(300, 0);
or
Me.ultraTree1.ColumnSettings.ColumnSets(0).Columns(1).LayoutInfo.PreferredLabelSize = New Size(300, 0)