Hi How to set the column size of a wintree with outlook express style? and set the data format in Money format?
Thanks!Steve
Use UltraTreeNodeColumn.LayoutInfo.PreferredLabelSize to adjust the column header size; cell widths will pick up the width under OutlookExpress. UltraTreeNodeColumn exposes a 'Format' property which you can use to control how cell values are depicted.
Example:int columnWidth = 200;TreeColumnsCollection columns = this.ultraTree1.Nodes[0].DisplayColumnSetResolved.Columns;foreach( UltraTreeNodeColumn column in columns ){ // Set the column width column.LayoutInfo.PreferredLabelSize = new Size(columnWidth, 0);
// TODO: Localize the currency format column.Format = "$#,###.00";}
Thanks a lot! Another 2 quick quesions: 1) I can't find how to set the alignment of a column in the wintree section of the online document. 2) How to show Tree lines ( connect to + sign to its child ) ?
Thanks again!
1) Assuming you mean text alignment, use the UltraTreeNodeColumn.CellAppearance.TextHAlign/TextVAlign properties.
2) Sorry, you can't. Node connectors are interntionally not displayed under OutlookExpress view style. Since the expansion indicator is displayed inside the cell area in that view, the node connectors would then have to be drawn over the cell area.
Thanks a lot!
When I click a node in winTree (multi columns), the node expands and how can I change the background color of all its child rows?
Handle BeforeExpand, iterate the e.TreeNode.Nodes collection, and assign an appearance on which that BackColor is set to the e.TreeNode.Nodes.Override.NodeAppearance property.
Example:private void ultraTree1_BeforeExpand(object sender, CancelableNodeEventArgs e){ e.TreeNode.Nodes.Override.NodeAppearance.BackColor = Color.Red;}