Edit tree node in a TypeScript code

3 posts, 0 answers
  1. Maxim
    Maxim avatar
    3 posts
    Member since:
    Jul 2015

    Posted 14 Jul 2015 Link to this post

    There is a solution here to edit nodes of a tree view control with the help of jQuery and jeditable library. Our application generates javascript from TypeScript. Apparently there are no typings for jeditable, thus no use of this solution in TypeScript. 

    In my code I initialize control and fill it in with data. I can add a​ "change" event and read and manipulate values.

    <p>private initTreeView() {</p><p>    var vm = this;​</p><p>    for(var i = 0; i < response.length; i++){<br>        items[i] = { 'text': response[i].name, id:response[i].id };<br>    }<br>    var maparray = [{'text': 'Maps', items}];<br><br>    vm.mapTree = new kendo.data.ObservableArray(maparray);<br>    vm.mapTree.bind('change', vm.treeViewChange);</p><p><span style="line-height: 1.5;">}</span></p><p><span style="line-height: 1.5;">private treeViewChange(e:any) {</span><br></p><p>    if(e != null || e != undefined) {<br>        //TODO: save changes to database<br>    }<br>}​</p><p></p>

    The question is how can I make node editable in UI?

  2. Maxim
    Maxim avatar
    3 posts
    Member since:
    Jul 2015

    Posted 14 Jul 2015 in reply to Maxim Link to this post

    Sorry for the formatting, can't edit it after it was posted.
  3. Dimiter Madjarov
    Dimiter Madjarov avatar
    2312 posts

    Posted 16 Jul 2015 Link to this post

    Hello Maxim,

    Editing of TreeView nodes is not supported out of the box. The approach, demonstrated in the mentioned forum topic is a custom one, implemented by our customer and we cannot provide assistance regarding it.

    Thanks for the understanding.

    Dimiter Madjarov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top