This is a migrated thread and some comments may be shown as answers.

Kendo UI Treeview with ASP.Net Treeview control issue

2 Answers 146 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Nitin
Top achievements
Rank 1
Nitin asked on 12 Jan 2012, 10:06 AM

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 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 12 Jan 2012, 10:18 AM
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!
0
Rino
Top achievements
Rank 1
answered on 22 Apr 2012, 07:02 PM
Tags
TreeView
Asked by
Nitin
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Rino
Top achievements
Rank 1
Share this question
or