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
ADAdministrator Syncfusion Team June 23, 2005 05:12 PM
Please refer to the forum post below:
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.
TTTTJune 23, 2005 05:52 PM
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
ADAdministrator Syncfusion Team June 24, 2005 09:43 AM
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:
TTTTJune 24, 2005 10:57 AM
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?
ADAdministrator Syncfusion Team June 24, 2005 03:37 PM
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.
TTTTJune 24, 2005 04: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?
TTTTJune 24, 2005 06:14 PM
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?
ADAdministrator Syncfusion Team June 27, 2005 02:50 PM
You should just be able to use the TreeNodeAdv.TextColor property.