jquery-treegrid icon indicating copy to clipboard operation
jquery-treegrid copied to clipboard

Create new nodes in runtime

Open mustax opened this issue 10 years ago • 2 comments

It's possible to add new nodes to the grid and make the expand/collapse work? I can't figure it out how.

Thaks.

mustax avatar Mar 20 '14 00:03 mustax

I got this to work

$('<tr class="treegrid-parent-'+id+' treegrid-temp"><td class="special"></td></tr>').insertBefore($(next));
var settings = $.extend({}, $.fn.treegrid.defaults);
 $('.treegrid-temp').treegrid('initNode', settings);

where next is other node(tr)

mgoffan avatar Apr 04 '14 18:04 mgoffan

there will be an issue when the child node your adding is not next to the parent node. trying to figure it out myself.

lesterjanpearson avatar Apr 30 '15 14:04 lesterjanpearson