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.
Unfortunately, activation email could not send to your email. Please try again.

Auto resize columns

Thread ID:

Created:

Updated:

Platform:

Replies:

130453 May 14,2017 07:19 AM May 16,2017 12:19 AM Windows Forms 3
loading
Tags: MultiColumnTreeView
Vhalaky
Asked On May 14, 2017 07:19 AM

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 06:50 AM

 
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;   
   
                }   
   
}   
   
   
Screenshot   
   
    
   
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.   
   
Regards,   
Mallika   
 


Vhalaky
Replied On May 15, 2017 07:19 AM

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

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

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.  
 
Regards, 
Mallika 


CONFIRMATION

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.

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.

;