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
190
Binding WebDataTree
posted

Hello I am new to using Infragistics controls, I have several questions bout the WebDataTree that I would like some help on.  But first here is the scenario.

 

I am trying to use the WebDataTree to allow uses to create and edit a virtual filing structure.  This structure contains a root folder, that can only contain child nodes. There are 3 different types of filing containers that a root node can contain.  Of these two container types two can contain child nodes of there own type, the other can not contain any children at all.  When one of these nodes are selected I would like to display a collection of controls (depending on type of container) allowing users to edit metadata of the filing structure,

 

My questions;

1.  What is the best approach for binding a WebDataTree to a dynamic tree as explained above?

2. How do you designate a "Top" Node that can only have child and nothing above it?

3. Does your edit mode allow for custom views, where I can build my own custom collection of controls to edit? 

Parents
  • 17590
    Offline posted

    Hello SIG,

    Thank you for posting in the community!

    1) WebDataTree supports a large number of bindable datasources. If you want to generate a tree node structure an Xml Data Source could be used. In order to retrieve your data from the Xml file, the data bindings for the nodes should be specified via the data binding editor. The data will be represented in hierarchical, node-like structure.

    Alternatively WebDataTree can be used to represent hierarchical data in a tree like structure. Hiererchical data can be offered by many sources such as datasets, custom objects, ObjectDataSource etc. The WebHierarchicalDataSource component can be used to create and represent your hierarchical data model.

    Some further reference could be found at:

    http://help.infragistics.com/NetAdvantage/ASPNET/2012.2/CLR4.0/?page=WebDataTree_Binding_to_Data.html

    Some saples illustrating Data Binding for WebDataTree could be found at:

    http://es.infragistics.com/products/aspnet/sample/data-tree/data-binding

     

     

    2) Whether a node in the tree would have children or not could be cofigured via the tree`s DataSource. If a particular node is set  as a root node in the datasource and afterwards bound  to the WebDataTree control this will ensure that there won`t be any noodes in the hierarchy above this one.

     

    3) I assume that templating is what you are looking for. Teplating allows to customize node rendering by inserting an ASP.NET and HTML content into the code. The following templating methods are supported:

    • An idividual node can have a specific template associated with it.
    • A collection of templates can be created and tmplates from this collection could be assigned to individual nodes
    • A base template can be created that will applied to each node in WebDataTree.

    With templating each individual node object`s look and feel could be cutomized depending on your requirements. However, please note that when a tree node is templated it could not be put into edit mode.

    Some further reference  to node templating and samples could be found at:

    http://help.infragistics.com/NetAdvantage/ASPNET/2012.2/CLR4.0/?page=WebDataTree_Node_Templating.html

     http://es.infragistics.com/products/aspnet/sample/data-tree/templates

    Hope this helps. Let me know if you have any further questions.

     

     

     

     

     

     

     

Reply Children