MultiColumnTreeView resize column


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.

3 Replies

AD Administrator Syncfusion Team May 28, 2009 03:25 PM UTC


Could somebody please help me fix this issue?





Thanks,
Rajendra


FS Fathima Shalini P Syncfusion Team 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


MO Mouna 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


Loader.
Up arrow icon