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. Image for the cookie policy date

Auto resize columns

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

3 Replies

MK Mallika Kannan Syncfusion Team 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;   
   
                }   
   
}   
   
   
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   
 



VH Vhalaky May 15, 2017 11:19 AM UTC

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


MK Mallika Kannan Syncfusion Team 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.  
 
Regards, 
Mallika 


Loader.
Live Chat Icon For mobile
Up arrow icon