How Do I update table in db after drop RRS feed

  • Question

  • User2041008840 posted

    How do i update database table after performing drag and drop using jquery. 
    i am using asp.net core this code is in cshtml code.

    this is my code - 

    $(function () {
               $(".deal-card").draggable({ helper: 'clone' }); //{ helper: 'clone' }
                   accept: ".deal-card",
                   drop: function (evui) {
                       var droppedItem = $(ui.draggable); //.clone()

    Thursday, October 24, 2019 11:23 AM

All replies

  • User475983607 posted

    The normal approach is reading the documentation that comes with the 3rd party library you are using.  The draggable library has 3 events; start drag and stop. https://jqueryui.com/draggable/#events.  Write code within one of the events to perform the dave.  Your code will do an AJAX request to an Action.  The Action saves the data in your database.

    Thursday, October 24, 2019 11:43 AM
  • User2041008840 posted

    I call ajax get  method and create function in controller which update record . 

    after dropping it will update the data in dtabase . 

    Thank you sir

    Thursday, October 24, 2019 4:09 PM