Title: Copy treegrid row Post by: hande89 on November 04, 2014, 02:47:32 AM Any advice on copying a treegrid row including its children? I'd like to append new rows with same details.
Title: Re: Copy treegrid row Post by: stworthy on November 04, 2014, 07:28:21 AM Just call 'find' method to find a specified row.
Code: var row = $('#tg').treegrid('find', id); Title: Re: Copy treegrid row Post by: hande89 on November 04, 2014, 09:00:23 AM I'd like to append it to root level. But IDs are in conflict. So I should change them and remove parentId property from node if it's not a root node.
Title: Re: Copy treegrid row Post by: hande89 on November 04, 2014, 11:47:47 AM Found a rough solution:
Code: var new_id = new_id || ''; New ID could be a running number but I need it to come from database anyway. |