This is a migrated thread and some comments may be shown as answers.

TreeList reference dataItem?

1 Answer 42 Views
Integration with other JS libraries
This is a migrated thread and some comments may be shown as answers.
f
Top achievements
Rank 1
f asked on 23 Jul 2015, 03:35 PM

I am trying to use a TreeList in my AngularJS app, based on demo "TreeList / Binding to local data".

I added a "createChild" button on each row as

columns: [
{ field: "Position", title: "Role", width: "350px" },
{ field: "Name", title: "Name", width: "250px" },
{ field: "Phone" },

{command: ["edit", "destroy", "createChild"]}
],

It is good to open an editor row under the button, but how do I reference its parent row?

I tried to add an "save" event as

save: function (e) {
alert(this.dataItem);
}

but it seems not right. Please advise!

By the way, when I "edit" and "delete" an item during the test, it successfully shows the result, but when I "update" the new row, it does not show up after the editing row closed. What do I miss?

 

Thanks,

 

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 27 Jul 2015, 06:09 AM

Hello,

 

e.model should hold reference to the model to be saved. The arguments of the event handler are described here - save event.

 

Regards,
Nikolay Rusev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Integration with other JS libraries
Asked by
f
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or