Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
Node.DataItem Is Nothing
posted

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.DataSource = PendingDocuments.Tables("Queues").DefaultView

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.DataMember = "Documents"

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

Parents
No Data
Reply
  • 28464
    posted

    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 

Children
No Data