We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Auto resize columns

Thread ID:





130453 May 14,2017 11:19 AM UTC May 16,2017 04:19 AM UTC WinForms 3
Tags: MultiColumnTreeView
Asked On May 14, 2017 11:19 AM UTC

Hello, i want to set auto resize columns to fill the whole treeview width. How can i do this?

Mallika Kannan [Syncfusion]
Replied On May 15, 2017 10:50 AM UTC

Hi Mate,   
Thank you for contacting Syncfusion support.   
At present there is no direct support to achieve this requirement. We have prepared a work around by handling SizeChanged Event in MultiColumnTreeView.   
Please make use of below Code Example.   
Code Example: [C#]   
//Resize Column size    
if (multiColumnTreeView1.Columns.Count > 0)   
                int Mwidth, Ccount, m;   
                Mwidth = multiColumnTreeView1.Width;   
                Ccount = multiColumnTreeView1.Columns.Count;   
                m = Mwidth / Ccount;   
                for (int i = 0; i < Ccount; i++)   
                    this.multiColumnTreeView1.Columns[i].Width = m;   
We have also prepared the sample for your reference, it can be downloaded from the below link,   
Please let us know if it is helpful.   

Replied On May 15, 2017 11:19 AM UTC

Hello, it is good enough. Thanks for the awesome support!

Mallika Kannan [Syncfusion]
Replied On May 16, 2017 04:19 AM UTC

Hi Mate, 
Thanks for your update.  
We are glad to hear that we have helped you in this. Please let us know if you need any other assistance.  


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon