I have created a dataset with tables and associated relations to populate an UltraWebTree.
Binding works using the following code, and the tree displays correctly:
Me.uwtPendingDocuments.Levels(0).RelationName = "FK_Queues_References"
Me.uwtPendingDocuments.Levels(0).ColumnName = "Name"
Me.uwtPendingDocuments.Levels(0).LevelKeyField = "ID"
Me.uwtPendingDocuments.Levels(1).RelationName = "FK_References_Documents"
Me.uwtPendingDocuments.Levels(1).ColumnName = "Reference"
Me.uwtPendingDocuments.Levels(1).LevelKeyField = "ID"
Me.uwtPendingDocuments.Levels(2).RelationName = "FK_Documents_Attachments"
Me.uwtPendingDocuments.Levels(2).ColumnName = "FileName"
Me.uwtPendingDocuments.Levels(2).LevelKeyField = "ID"
Me.uwtPendingDocuments.Levels(3).ColumnName = "FileName"
Me.uwtPendingDocuments.Levels(3).LevelKeyField = "ID"
Me.uwtPendingDocuments.DataBind()
However, when the NodeBound event fires, e.Node.DataItem is nothing, and I need to access the information in the DataItem to modify the nodes.
Am I doing something wrong on the databind?
Any help will be appreciated
By the way, you can always check out the new WebHierarchicalDataSource control we just released, it makes databinding UltraWebTree (and Menu, Grid, etc) to hieararchical structures so much easier - it practically can be done with a few mouse clicks in the designer.
You can check out the WHDS samples online here:
http://samples.infragistics.com/2008.2/webfeaturebrowser/default.htm
Hello,
Please, take a look at the attached picture for information on how I bind UltraWebGrid to DataSet, members of e.Node.DataItem and values. It is working fine in my case.
What am I missing? Can you use something similar in your project?