Dear to whom it may concern,
I have an igTree bound to a viewModel using Knockout and this is working well.
I am returning the viewModel to the server, by Ajax JSON Post to Web API (ASP.NET), on a Button Click event.
My problem is that when I delete nodes I think they are being removed from the viewModel that is being returned to the server.
Is there a way of marking the entries for delete, using the knockout '_destroy' field rather than deleting them from the viewModel (unless it already does this and I am missing something) and, if so, how do I use ASP.NET Web API to retrieve the viewModel including the _destroy property (I understand the latter is strictly not related to the igTree control but any help would be greatly appreciated)?
Many Thanks
Paul Fryer
Hello,
Thank you for contacting us.
This is happening automatically. Currently it is not possible to set them as deleted and not to show them. The reason is that is bound to observable array.
You can try not to use observable and later to delete them from the data source.
References, regarding accessing data from a controller and getting current model in a controller, you can find below:
http://stackoverflow.com/questions/18048112/asp-mvc-4-get-current-model-in-controller
http://www.asp.net/mvc/tutorials/mvc-5/introduction/accessing-your-models-data-from-a-controller
Let me know if I may be of further assistance.