Node templates without databinding

3 posts, 0 answers
  1. Roland
    Roland avatar
    156 posts
    Member since:
    Feb 2009

    Posted 19 Oct 2009 Link to this post

    Hello,

    I have a treeview structure that is being created without using databinding.

    I manually create nodes and add the to the tree/ other nodes.

    The question is: How do I template some of my nodes. Is this even possible ?

  2. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 05 Nov 2009 Link to this post

    You can do the following to use templates with your nodes:
            <telerik:RadTreeView ID="myTree" runat="server"
                <Nodes> 
                    <telerik:RadTreeNode runat="server" Text="Root RadTreeNode1"
                        <Nodes> 
                            <telerik:RadTreeNode runat="server" Text="Child RadTreeNode 1"
                            </telerik:RadTreeNode> 
                            <telerik:RadTreeNode runat="server"
                                <NodeTemplate> 
                                    ... 
                                </NodeTemplate> 
                            </telerik:RadTreeNode> 
                        </Nodes> 
                        .... 

    Or are you perhaps looking for a way to manually add the same templated node over and over?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Roland
    Roland avatar
    156 posts
    Member since:
    Feb 2009

    Posted 05 Nov 2009 Link to this post

    I wanted to do this programmaticaly.

    I used ITemplate interface for my template.
Back to Top