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
1120
WinTree: How to set the column size
posted

Hi How to set the column size of a wintree with outlook express style?  and set the data format in Money format?

Thanks!
Steve

Parents
  • 69832
    Offline posted

    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";
    }

Reply Children