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
850
Changing column widths programmatically
posted

Ideally, I'd like to get my tree to automatically resize its columns based on weights, but that doesn't seem to work in Grid view, so the next best thing would be to do it in code. How can I change the width of a column in code? This ought to be simple, but it's not.

Aaron

  • 4219
    posted

    Hi,

     

    You could try the following:

    foreach (UltraTreeNodeColumn column in ultraTree1.ColumnSettings.RootColumnSet.Columns)

                    column.PerformAutoResize();

    For each column in the columnset call PerformAutoResize Method

    Let me know if this works for you.

     

    Regards,

    Stefaniya