Ticket B2158
Visible to All Users

How can I assign a pointer to cxDBTreeList nodes, root and child, if I use a dataset to build the treeview?

created 19 years ago

Or, should I build the treeview manually, creating the root and child nodes and assign the pointer to the node.data property as I create each node? I understand how to create the child nodes of an existing root node, but how do I create the root nodes at runtime?

Comments (1)
DevExpress Support Team 19 years ago

    Hi Sam,
    Sorry, but it is not quite correct to use the Node.Data property when working with the data-aware TreeList control. Please try to use an additional field in the data store instead.
    However, you can also work with the unbound TreeList control and populate its nodes manually at runtime. In this case, you can use its Add, AddFirst and AddChild methods to populate the control (please review the "TcxCustomTreeListControl.AddNode" topic in the ExpressTreeList help for additional information) and handle the OnDeletion event to deallocate the current node’s data object.
    Thanks,
    Vito

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.