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

VirtualTreeGrid sample problem

Thread ID:





11745 Mar 15,2004 01:11 PM UTC Apr 11,2006 09:50 AM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On March 15, 2004 01:11 PM UTC

I think I am missing something with this sample. It seems to come with a data file (*.cds) that already has the hiearchy in place. But nowhere in the code do I see a way to create the hiearchical data set, only a way to create a flat set. Thus when trying to move the code to another app, there is no sample data set that can be used, since the data set that comes with it has its persisted version tied to the sample''s assembly. Any ideas?

Administrator [Syncfusion]
Replied On March 15, 2004 03:05 PM UTC

In that sample, to use your own data, you would have to write code that creates a CollapsibleDataSource object that holds your data. This means you would modify the code in SampleData file. You would create and populate a CollapsibleDataSource.data object using code similar to that in CollapsibleDataSource.InitData. As you add each object to the CollapsibleDataSource.data, you would set its expandstate and indentlevel to reflect what you want that row to have. If you comment out the //ReadData("datasample.cds"); in the FormLoad, then you will see the flat table set up by calling InitData. You can then right-click the left cell, and set its indent level to make this flat table look like a tree. The idea is that you can do the same thing from code as you create the CollapsibleDataSource.data. Once you have your table created, you can serialize it in the cds format so it then could be read from file from that point on. But the first cds structure either has to be done from code, or from the UI (rightclicking etc.). This sample does not use the standard AddNode/RemoveNode sturcture you might see in a treeview.

Administrator [Syncfusion]
Replied On April 11, 2006 12:14 AM UTC

Are there any code samples available that illustrate importing into a CollapsibleDataSource class from an XML file? Data that is not serializable. Thanks! eric

Administrator [Syncfusion]
Replied On April 11, 2006 09:50 AM UTC

Hi Eric, Please refer to this forum thread that has a sample which populates the CollapsibleDataSource.data with a data set, to see if that helps. Regards, Calvin.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon