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
AD
Administrator
Syncfusion Team
June 23, 2005 10:12 PM UTC
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
TT
June 23, 2005 10:52 PM UTC
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
AD
Administrator
Syncfusion Team
June 24, 2005 02:43 PM UTC
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
TT
June 24, 2005 03:57 PM UTC
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?
AD
Administrator
Syncfusion Team
June 24, 2005 08:37 PM UTC
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
TT
June 24, 2005 09:47 PM UTC
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
TT
June 24, 2005 11:14 PM UTC
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
AD
Administrator
Syncfusion Team
June 27, 2005 07:50 PM UTC
Hi TT,
You should just be able to use the TreeNodeAdv.TextColor property.
Regards,
Gregory Austin
Syncfusion Inc.