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.

display xml file in tree view format

Thread ID:

Created:

Updated:

Platform:

Replies:

30786 Jun 23,2005 01:47 PM Jun 27,2005 03:50 PM Windows Forms 8
loading
Tags: Tools
TT
Asked On June 23, 2005 01:47 PM

Hi I want to be able to display various xml files in tree view format similar to the look of the GDBGTreeLines sample under DataBound Hierarchical, but not sure how & unable to find an example. Although the xml files are different, and therefore is somewhat dynamic, they all follow a particular schema. Please help thanx TT

Administrator [Syncfusion]
Replied On June 23, 2005 06:12 PM

Hi TT, Please refer to the forum post below: DataBound TreeViewAdv I believe that it contains what you''re looking for. If it isn''t, you should be able to parse the .xml yourself and create a Node structure yourself. Please let me know if you have any questions about either of these. Regards, Gregory Austin Syncfusion Inc.

TT
Replied On June 23, 2005 06:52 PM

Hi Gregory I''m unable to build this soln in Visual Studio 2003 & got the following error messages 1. can''t references Syncfusion.Grid, .Group, .Tool, and .Share. I tried to remove these references & replaced them with Syncfusion.Grip/Group/Tool/Share.Base -- which removed the error messages, but not sure if that has any other affects 2. unable to reference TreeViewAdvDataBound_Lib 3. TreeNodeAdv type could not be found 4. XPMenus doesn''t exists in syncfusion.Windows.From.Tools

Administrator [Syncfusion]
Replied On June 24, 2005 10:43 AM

Hi TT, I believe that this sample was created with an older version of Tools that had different assembly names. Please try and remove all of the Syncfusion references and add the following references: Syncfusion.Core Syncfusion.Shared.Base Syncfusion.Shared.Windows Syncfusion.Grid.Base Syncfusion.Grid.Windows Syncfusion.Tools.Base Syncfusion.Tools.Windows Regards, Gregory Austin Syncfusion Inc.

TT
Replied On June 24, 2005 11:57 AM

Hi In addition to the list of references that you suggested, I also added Syncfusion.Grouping.Base/Windows to remove some additional errors. Unfortunately, I have a runtime error when executing the following statement: this.td = new TableDescriptor(); In the TreeViewAdvDataBound constructor. This is the error message: A first chance exception of type ''System.NullReferenceException'' occurred in syncfusion.core.dll Additional information: Object reference not set to an instance of an object. Looking at the code, I notice that it involves a DB. For what i''m trying to do, the content of the treeview control is extracted purely out of an xml file. Therefore, is this sample really applicable, or would it be best for me to just scan the xml files & recursively build my tree?

Administrator [Syncfusion]
Replied On June 24, 2005 04:37 PM

Hi TT, I believe there''s a way to databind to an XML file, but I''m not sure. However, parsing the XML file and recursively building the tree is definitely the simple solution. Regards, Gregory Austin Syncfusion Inc.

TT
Replied On June 24, 2005 05:47 PM

ok, I was able to parse the xml file & recursively building my tree. However, besides the root node, all others'' node text is not show because their visibility property is set to false. However, I can''t reset (tmptreenodeadv.Visible = true) it due to their protection level. What should I do? Is there a sample out there where the node is programmically added & not thru the designer interface?

TT
Replied On June 24, 2005 07:14 PM

Hi Gregory Never mind, I realized that it was because it''s white on white. Now, is it possible to change the text color of a treeNodeAdv type so that I could keep the treeViewAdv control white? thx TT

Administrator [Syncfusion]
Replied On June 27, 2005 03:50 PM

Hi TT, You should just be able to use the TreeNodeAdv.TextColor property. Regards, Gregory Austin Syncfusion Inc.

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.

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.

;