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?