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

Drag and Drop TreeView

1 Answer 218 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
technotes
Top achievements
Rank 1
technotes asked on 21 Nov 2016, 10:06 PM

This is a two part question, first how do I know what controller parameters are needed fro the update action for the tree view (Same question applies to all Kendo controls) No error is thrown so I don't known what route (route signature) to build.

 

Second, could be related to the first my action is public JsonResult Update([DataSourceRequest] DataSourceRequest request, ProductViewModel product) but when I do a drag and drop the action isn't fired.  I have found when this happens typically it is because I don't have a matching signature for the route... but again no error is thrown so I can't debug it. 

 

Thanks in advance and sorry if I am not using the correct terminology for this.

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 23 Nov 2016, 12:56 PM
Hello,

The Update action for the DataSource expects the request and the updated item to be passed as parameters by default. Check out the following example that illustrates how you can implement editing in the TreeList component.


Regarding your other query. If you would like to call the Update action after an item was dropped you can handle the dragEnd event. In the handler you can call the sync() method for the dataSource.


function dragEnd(e) {
        this.dataSource.sync();
    }


Regards,
Viktor Tachev
Telerik by Progress
Telerik UI for ASP.NET MVC is ready for Visual Studio 2017 RC! Learn more.
Tags
TreeList
Asked by
technotes
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or