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

Multicolumntreeview databound sample

I cant seem to find very much documentation on using the multicolumntreeview. I'm wondering how to use a datasource with it and have the columns be sortable. I also would like to know how to get fill columns to span the entire width of the control (ie when resized).

will i need to use something like the GridColSizeHelper found here?


http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=70



Thanks
-Vinod

2 Replies

RA Rajagopal Syncfusion Team October 31, 2007 02:08 AM UTC

Hi Vinod,

In your form's constructor add the following code to make all the columns in the MultiColumnTreeViewControl span the entire width of the control.

int width = this.multiColumnTreeView1.Width;
int colCount = this.multiColumnTreeView1.Columns.Count;
int val = width / colCount;
foreach (Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeColumnAdv treeColumn in multiColumnTreeView1.Columns)
{
treeColumn.Width = val;
}

Regarding setting the datasource for MultiColumnTreeViewControl, there is no direct support for setting the DataSource in a MultiColumnTreeViewControl. But one way you can do this by manually adding the nodes depends on the number of items in your underlying datasource.

Regards,
Rajagopal



VT Vinod Tandon October 31, 2007 08:43 PM UTC

Thanks Rajagopal,

I am currently experimenting with the Grid.Grouping control as I think that might work better than using the multicolumntreeview.

Thanks
-Vinod

Loader.
Live Chat Icon For mobile
Up arrow icon