Dynamic Text Box’s as in JQuery Tree structure

147 views
Skip to first unread message

Guhananth Sathiyaseelan

unread,
Jul 18, 2016, 8:43:08 AM7/18/16
to jsTree
Hi,
I want to create jquery tree view with textboxes instead of label, how to do it.
  1. I can create any number of nodes and subnodes ,just by right click---> Add new node or Delete node
       Tree view will look like

   Node 1
       ---- child 1   option to right click --Add new node  or delete node
     -- - child 2

    Node 2
       ---- child 1
       - child 2

At present I have tree with labels. Right click I am not getting Add new node or delete new node

Here is the code
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Demo.aspx.cs" Inherits="Test.Demo" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="JS/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="JS/tree.jquery.js" type="text/javascript"></script>
    <link href="Css/jqtree.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        var data = [
    {
        label: 'node1',
        children: [
            { label: 'child1' },
            { label: 'child2' }
        ]
    },
    {
        label: 'node2',
        children: [
            { label: 'child3' }
        ]
    }
];
    $(function () {
        $('#tree1').tree({
            data: data
        });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div id="tree1"></div>
    </form>
</body>
</html>

When at new node is selected user can add new node at any point

When delete node is selected user can view delete a node

I need something like example 7 in this url


Reply all
Reply to author
Forward
0 new messages