primaryKey : stringDefault: undefined

Primary key field name.

Examples

defined

    
 <p>Select a node to see the key.</p>
 <div id="tree"></div>
 <script>
     $('#tree').tree({
         primaryKey: 'id',
         dataSource: [ { id: 101, text: 'foo', children: [ { id: 202, text: 'bar' } ] } ],
         select: function (e, node, id) {
             alert('Your key is ' + id);
         }
     });
 </script>

  

undefined

    
 <p>Select a node to see the key.</p>
 <div id="tree"></div>
 <script>
     $('#tree').tree({
         dataSource: [ { id: 101, text: 'foo', children: [ { id: 202, text: 'bar' } ] } ],
         select: function (e, node, id) {
             alert('Your key is ' + id);
         }
     });
 </script>