Kendo UI Treeview with ASP.Net Treeview control issue

3 posts, 0 answers
  1. Nitin
    Nitin avatar
    4 posts
    Member since:
    Nov 2011

    Posted 12 Jan 2012 Link to this post

    Hi,

    I am trying to implement Kendo UI Treeview control with ASP.Net TreeView control. But its not working as it should be. Please suggest me your views.

    What I have done till now as per below.
    (1)    As per Kendo UI, Its working fine.

        <ul id="treeview">

            <li>Item 1
                
    <ul>
                    
    <li>Item 1.1</li>
                    
    <li>Item 1.1</li>

                    <li>Item 1.1</li>

                    <li>Item 1.1</li>

                </ul>

            </li>

            <li>Item 2
                
    <ul>
                    <li>Item 2.1</li>
                    
    <li>Item 2.2</li>
                    
    <li>Item 2.3</li>
                    
    <li>Item 2.4</li>
                    
    <li>Item 2.5</li>
                </ul> 
                </li> 
        </ul>

     

    JQuery Code:

           $("#treeview").kendoTreeView({

                    dragAndDrop: true

                });

     

     

     

    (2)    I am trying to implement the same with ASP.Net Treeview control but it’s not working.  Please check the below code.

            <asp:TreeView ID="ASPTreeView" runat="server" ImageSet="BulletedList">
                
    <Nodes>
                    
    <asp:TreeNode Text="Table of Contents"></asp:TreeNode>
                        
    <asp:TreeNode Text="Chapter One">
                        
    <asp:TreeNode Text="Section 1.0">

                        <asp:TreeNode Text="Topic 1.0.1" />
                        
    <asp:TreeNode Text="Topic 1.0.2" />
                        
    <asp:TreeNode Text="Topic 1.0.3" />
                        
    </asp:TreeNode>
                        
    <asp:TreeNode Text="Section 1.1">
                        
    <asp:TreeNode Text="Topic 1.1.1" />

                                <asp:TreeNode Text="Topic 1.1.2" />

                                <asp:TreeNode Text="Topic 1.1.3" />

                                <asp:TreeNode Text="Topic 1.1.4" />

                            </asp:TreeNode>

                        </asp:TreeNode>

                        <asp:TreeNode Text="Chapter Two">

                            <asp:TreeNode Text="Section 2.0">

                                <asp:TreeNode Text="Topic 2.0.1">

                                    <asp:TreeNode Text="Subtopic 1" />

                                    <asp:TreeNode Text="Subtopic 2" />

                                </asp:TreeNode>

                                <asp:TreeNode Text="Topic 2.0.2" />

                            </asp:TreeNode>

                        </asp:TreeNode>

                    </Nodes>

                </asp:TreeView>

     JQuery Code: 
           $("#ASPTreeView ").kendoTreeView({
                    dragAndDrop: true
                });

    Thanks. 

  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 12 Jan 2012 Link to this post

    Hello,

     The ASP.NET TreeView does not render <ul><li> structure which is the reason the Kendo TreeView does not recognize it. 

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Rino
    Rino avatar
    1 posts
    Member since:
    Apr 2012
Back to Top