I am try to populate the treenodes dynamically from database so I am able to do that in treeview of VS 2005 but with Ultra tree its displayinge me just the parent nodes.what can be the reason?? and I switched to ultratree because I will be displaying 4 columns as child nodes whcih can be modified (edit)....so how will I be able to do that I am a newbee....so please if possible explain me in detail .Thanks
This code works for populating the child node for a simple treeview but not for ultratreeview
TreeNode mainNode = new TreeNode(); mainNode.Text = "Eserver"; this.ultraTree1.Nodes.Add(mainNode.Text); foreach (DataRow row in Eset.Tables[0].Rows) { TreeNode newNode = new TreeNode(); foreach (DataRow rowchild in row.GetChildRows("RelEntLic")) { TreeNode childNode = new TreeNode(); childNode.Text = rowchild["YearsBack"].ToString(); childNode.Tag = rowchild["EntitlementSetID"]; newNode.Nodes.Add(childNode); } newNode.Text = row["FullDeatilsESet"].ToString(); newNode.Tag = row["EntitlementSetID"]; //newNode.SelectedImageIndex this.ultraTree1.Nodes[0].Nodes.Add(newNode.Text); }
Thanks a lot for replying back. That was a Typo and to submit to Infragistics Developer Support can you post me the link please where I can submitt them.
Regards
Sam
TechSam said:this.bindingSource2.DataSource = Eset; this.bindingSource2.DataMember = el.TableName; this.ultraTree1.DataSource = this.bindingSource1; this.ultraTree1.Refresh();
Is this a typo? Or are you actually setting the DataSource and DataMember of one BindingSource and then binding to tree to a completely different BindingSource?
Again, I'm really not sure why the child nodes are not showing up. You should submit a sample project to Infragistics Developer Support so they can check it out.
This is the sample code--> Eset is a DataSet having two tables (el and es)inside it.
this.bindingSource2.DataSource = Eset; this.bindingSource2.DataMember = el.TableName; this.ultraTree1.DataSource = this.bindingSource1; this.ultraTree1.Refresh();
This is where I am populating the root node "Eserver" and then parent nodes "FullDeatilsESet"and the child node "YearsBack". I am using relation on the bases of column and displying the related nodes as child nodes.
TreeNode mainNode = new TreeNode(); mainNode.Text = "Eserver"; this.ultraTree1.Nodes.Add(mainNode.Text); foreach (DataRow row in Eset.Tables[0].Rows) { TreeNode newNode = new TreeNode(); foreach (DataRow rowchild in row.GetChildRows("RelEntLic")) { TreeNode childNode = new TreeNode(); childNode.Text = rowchild["YearsBack"].ToString(); childNode.Tag = rowchild["EntitlementSetID"]; newNode.Nodes.Add(childNode); } newNode.Text = row["FullDeatilsESet"].ToString(); newNode.Tag = row["EntitlementSetID"]; this.ultraTree1.Nodes[0].Nodes.Add(newNode.Text); }
The Problems
The same code works for simple treeview1 but not working for ultraTree1. Not working means its not displaying the child nodes and when I am trying to debug its showing me that it does have the childnode ..i dont know why its not displaying.
2nd problem is that even if its displaying then how can i display all the fields (4 columns"Years Back""Quareters Backs" "LicID" "DataID" )not just "YearsBack".
That is I want to display the whole table with 4 columns as a child node and these nodes should have the property of updating ..I think something like this GRID STYLE
http://help.infragistics.com/NetAdvantage/NET/2008.2/CLR2.0/
If you want any other information do let me know Thanks
I'm having trouble understand what you wrote here. SetDataBinding is not working? What exactly is not working?
If the child nodes are not displaying, then your data structure must not be set up with the correct structure.
The samples are installed with NetAdvantage. I really don't know exactly where. I assume it's somewhere under the folder where you installed the NetAdvantage suite. If you can't find it, perhaps you should Submit an incident to Infragistics Developer Support and they can probably tell you more specifically where the samples are installed.
Perhaps at this point, you should submit a sample demonstrating the problem, since it sounds like the issue may be too complex to answer in a forum post.
SetDataBinding its not showing me that do i need to have some header file for that right now i am using Infragistics.Win secondly as mentioned in the code in my first post its not displaying me the childnodes what about that ..I mean I am able to display the child nodes with the same code but by using simple treeview not ultra.
Last question where are samples installed so that I can have a look into it .
Thanks