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.
Syncfusion Feedback

MultiColumnTreeView resize column

Thread ID:

Created:

Updated:

Platform:

Replies:

81996 May 26,2009 09:59 PM UTC Jul 22,2011 12:50 AM UTC Windows Forms 3
loading
Tags: Tools
Administrator [Syncfusion]
Asked On May 26, 2009 09:59 PM UTC


Hi,


1) How to resize the column, which has tree nodes, to show all the content of all nodes dynamically as the user exapnds the nodes.


2) How do I determine the size of the column to show all the content of all nodes programatically. Is there any method or property on this control?



I am using syncfusion 6.1.0.34.



Thanks,
Rajendra prasad Racharla.

Administrator [Syncfusion]
Replied On May 28, 2009 03:25 PM UTC


Could somebody please help me fix this issue?





Thanks,
Rajendra

Fathima Shalini P [Syncfusion]
Replied On May 29, 2009 07:05 AM UTC

Hi Rajendra,

Thank you for your interest in Syncfusion Products.

1) Programmatically resizing the Column size when expanding the nodes:

This can be achieved by adjusting the Column width in BeforeExpand event. Kindly refer to the code snippet and the sample provided below:


private void multiColumnTreeView1_BeforeExpand(object sender, Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeViewAdvCancelableNodeEventArgs e)
{
int ColWidth = this.multiColumnTreeView1.Columns[0].Width;
int Node_Width = e.Node.Nodes[0].TextBounds.X + e.Node.Nodes[0].TextBounds.Width;
if (Node_Width >= ColWidth)
{
this.multiColumnTreeView1.Columns[0].Width = 25+ e.Node.Nodes[0].TextBounds.X + e.Node.Nodes[0].TextBounds.Width;
}
}


2) Setting size of the column programmatically:

This can be achieved using MultiColumnTreeView's Columns[index].Width property as described below:


this.multiColumnTreeView1.Columns[0].Width = 100;


Sample : http://files.syncfusion.com/support/Tools.Windows/7.2.0.20/F81996/main.htm

Please let me know if any concerns.

Regards,
Fathima

Mouna
Replied On July 22, 2011 12:50 AM UTC

i had a question regarding the same.

how o i set the minimum width the colums can be resized to and also how do i make the colums resize back to its original size when it is double clicked.

thank you


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.

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

;