Reputation: 781
is it possible to drag row that contains Id for a Order att drop it on anothe table and get all data with this Id on the id table on MVC? What im trying to do is that i have table for "ProductionOrders" and i have table for "Orders" i want to drag a Order to ProductionOrder table and save that. so that means the dropes Order will be in Production.
so Order table has rows with order name and another column with order id. i want to drag it and when i drop it on the other table i want to got the details like " order name, date, description, and so in " Any idea? tutorial that can help ?
Upvotes: 1
Views: 3969
Reputation: 2896
*update on 6/16 * : please refer to my answer at how to set Individual rows marked as non-draggable and/or non-droppable? for more information
sure its possible, use jquery ui draggable and jquery dropable, and an ajax post.
when the item is dropped into the target list fire an ajax post event.
the post event would hit a method that does the database work to remove the record from the 1st table and add it to the 2nd table.
http://jqueryui.com/droppable/ http://jqueryui.com/draggable/
Specifically see the demo at http://jqueryui.com/droppable/#shopping-cart you're going to do something like this, with an extra ajax event to hit the server side
Upvotes: 1