Hi all i'm using a ultratreeview with viewstyle = freeform , i need to show large text in a column cell, i want the cell is fixed witdh and autosize height, this is my code but the cell don't size automatically:
UltraTreeColumnSet columnSet = new UltraTreeColumnSet(); UltraTreeNodeColumn info = columnSet.Columns.Add("info"); info.Text = "Descrizione"; info.CellWrapText = Infragistics.Win.DefaultableBoolean.True; info.AutoSizeMode = ColumnAutoSizeMode.VisibleNodes; info.LayoutInfo.PreferredLabelSize = new System.Drawing.Size(80, 20); info.LayoutInfo.PreferredCellSize= new System.Drawing.Size(80, 50); info.DataType=typeof(string); utvScadenze.NodeLevelOverrides[3].ColumnSet=columnSet;
...... Laod Tree.....
Aha! I forgot about that.
If it would help you for this to work in Grid style, you should Submit a feature request to Infragistics and perhaps this can be implemented in a future release.
Actually, I found this old thread where Brian Fallon (Infragistics) seems to suggest that AutoFitColumn setting has no effect unless the tree style is OulookExpress:
http://blogs.infragistics.com/forums/p/39801/294158.aspx#294158
If you tree nodes are displaying with columns and AutoFitColumns isn't working, then I don't know why that would be.
Can you post a small sample project demonstrating this?
ResizeAllColumns is what its set to, still the same problem...any other solutions? Thanks.
Oops. Sorry about that, it's not on the ColumnSet, it's on the tree's ColumnSettings:
this.ultraTree1.ColumnSettings.AutoFitColumns = Infragistics.Win.UltraWinTree.AutoFitColumns.ResizeAllColumns;