Implementation Code of the JS component BootstrapTable table row dragging Effect

Source: Internet
Author: User
This article shares the code for using the JS component BootstrapTable table to drag and drop table rows. For more information, see I. business requirements and implementation results

The project involved the order module. On that day, I suddenly received a request, saying that the ticket insertion effect should be achieved between two orders in different States. The presentation method on the page is: two tables on the left and right, in the left Table, there are orders in the state of 1, and in the right Table, there are orders in the state of 2. The row data in the left Table is dragged to the specified row position in the right Table. After the row is dragged, delete one row from the left table and add one row to the right table. In addition, you also need to cancel the operation (equivalent to the Ctrl + Z operation) to return to the status of the previous step. The description may allow everyone to simulate pipeline. It has been implemented. Let's take a look.

1. first look at the effect before dragging

2. This is the result of dragging the row data in the left table.

2.1 cshtml Page code

 
  @ ViewBag. Title@ Styles. Render ("~ /Content/css ") @ Styles. Render ("~ /Content/table-css ") @ Scripts. Render ("~ /Bundles/jquery ") @ Scripts. Render ("~ /Bundles/knockout ") @ Scripts. Render ("~ /Bundles/bootstrap ") @ Scripts. Render ("~ /Bundles/bootstrap-table ") @ RenderSection (" Scripts ", false)@ RenderBody ()@ {ViewBag. Title = "order ticket insertion"; Layout = "~ /Views/Shared/_ Layout. cshtml ";}@ Scripts. Render ("~ /Bundles/Order/InsertOrder ") @ Styles. Render ("~ /Bundles/Order/css ") @ Scripts. Render ("~ /Content/bootstrap/datepicker/js ") @ Styles. Render ("~ /Content/bootstrap/datepicker/css ")
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.