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); }
What ViewStyle are you using for your tree?
If you are showing multiple column, then how are you creating your ColumnSets?Or did you not get that far, yet?
If you want the tree to show data from a data table, why not simply bind it, rather than copying the data?
I have not got too far ..Is there a sample code I can refer too ,,,,you are correct I have to display the columns from a specific table but based on the parent node I am using relation to relate parentnode [EntitlementsSetID] from table ESERVER to child node [EntitlementSetID] from Table LIC_ENT now I have to display all 4 columns form this child table [LIC_ENT] which a user can edit. I am Using it first time demo vesion ..if it works out i will buy it. Thanks
Hi Sam,
I posted the link above, but here it is again: Submit an incident to Infragistics Developer Support
Hey,
T his is my sample code
private DataSet Eset; this.Eset = new DataSet("EsetMap"); DataTable el = getEtitlementSetLicGrp(); DataTable es = getEserverEtitlementSetID(); this.Eset.Tables.Add(es); this.Eset.Tables.Add(el); this.ultraTree1.SetDataBinding(Eset, el.TableName); [working now and as a result is showing me the whole table in grid format ] DataRelation relEntLic; DataColumn col1 = new DataColumn(); DataColumn col2 = new DataColumn(); col1 = this.Eset.Tables["getEserver"].Columns["EntitlementSetID"]; col2 = this.Eset.Tables["getEntitlement"].Columns["EntitlementSetID"]; relEntLic = new DataRelation("RelEntLic", col1, col2, false); Eset.Relations.Add(relEntLic);
Now can you please tell me how to display it using parent child realtion I mean do i have to diaplayteh parent node using for loop as i did earlier ...but its not helping ....
I added these lines and it worked :) .
this.ultraTree1.SetDataBinding(Eset, el.TableName);
this.ultraTree1.SetDataBinding(Eset, es.TableName); this.ultraTree1.Override.ShowExpansionIndicator = Infragistics.Win.UltraWinTree.ShowExpansionIndicator.CheckOnDisplay; this.ultraTree1.ViewStyle = Infragistics.Win.UltraWinTree.ViewStyle.Grid;
Now the issue is how to edit the cells ...I mean If I have to change the value of a cell in the column or grid how will I go about it ?
I don't have it completely solved on the edit part... However...
If you use the custom properties page (right click context menu on the ultraTree control), under tree there is a node called Override there is a property called CellClickAction. Choose one of the EditCell options. Note, this is change quite a few behaviors with the tree, so test your tree extensively to make sure you like the changes....
Now... This allows editing, but unless each specific column/cell has addition configuration, no editing occurs....
I use the custom properties page to design my columns in outlook mode, so I can onyl advise from the perspective....
Under UltraTree -> ColumnSettings -> RootColumnSet -> Columns I see each of my configured columns....
CascadeAdd and Reference I'll refer too....
CascadeAdd is a workign checkbox... I set the followign properties:
AllowCellEdit = Full
DataType = SYstem.Boolean
EditorControl = (none)
I can set and unset the check box jsut fine. However I can never get the afterCheck event to fire so I'm not havign much luck detecting changes...
Reference is string description of the record table location or a strign description of the field reference type
DataType = SYstem.String
For this I cna edit, the TextChanged event doesn't fire and I've tried assigned various controls to it, but they never appear... Not sure what's going on with that...
Hopefully this will get you a few steps closer....