Hi
I will give small example how i am loading xml files into GUI in the form of tree structure.
obj_ServiceConfiguration_XmlDocument.Load(str_ServiceConfiguration_FileName) (using System.Xml.XmlDocument object i am loading XML file).
In design phase, I am using Infragistics.Win.UltraWinTree.UltraTree to display XML in the form of Tree structure. By default This UltraTree is having one Root Node.
Once I loaded XML using XMLDocument object.......do the folowing steps until XML reaches end.
1) create the object of Infragistics.Win.UltraWinTree.UltraTreeNode
2) Get the node from XMLDocument object and assigns to the TreeNode.
3) This UltaTreeNode will add into parent node of Infragistics.Win.UltraWinTree.UltraTree
The same steps will follow until reaches XML end tag.
This is taking long time to load files into GUI.
If you need any clarification on this aske me... I will send in detail. my personal mail id is: prathap_u@rediffmail.com
Reply
Thank you for your time
Regards
Prathap Reddy U
You mention a performance issue, but you are not very specific about what's happening. What is your question?
I assume it's taking a long time to load the nodes into the tree.. about how long is it taking?
What version of the control are you using?
I am using Infragistics 5.2 controls.
Issue is: loading 8mb xml file it is taking time 14 minutes.
Well, 5.2 is a really old version.There have been many performance improvements made to the tree in the 3 years since that version was released. I recommend that you download the trial version of NetAdvantage 8.2 and test it out. I'm sure it will be a lot faster.
Apparently you posted the same question here (http://news.infragistics.com/forums/t/10807.aspx) and did not see the answer. The answer to that post (use the BeginUpdate/EndUpdate methods) will almost certainly solve this problem. Alternatively, you can use the AddRange method instead of Add. Each time the Add method is called, the control has to recalculate its metrics, which is a relatively expensive operation.
Hi,
Nice to see your reply. I tried using the same methods. Still facing the prob. I am using Infragistics.5.2
Could you please send small example using BeginUpdate and EndUpdate methods? It would be great help.
Thank you for your time.
There's really nothing to it:
tree.BeginUpdate();
// Add all of the nodes to the tree here
tree.EndUpdate();