Categories Technology

Drag and drop between dashboard elements – Xlinesoft Blog


In this article, we will show how to implement drag and drop between two dashboard elements. It makes more sense to drag and drop records between two grids. In this example, we will use two tables named orders And archive_commands.

This is what it will look like in the generated application:


1. SQL query that creates the required tables in the database

2. Create a dashboard in PHPRunner or ASPRunner.NET and add these two tables to it.

3. The following code goes to the Javascript OnLoad event of both orders And archive_commands Table list pages.

Things to change:
– var connectTable must contain the name of another table. In orders table code, it must indicate “orders_archive” and vice versa.
– “dashboard_dashboard.php” URL of the dashboard page. In ASPRunner.NET it will be something like dashboard
– “OrderID” – key column name of the current table.

4. Dashboard page: BeforeProcess event

In this case, we add a new record to the target table and delete it in the source table. The second section of this code helps us update the sort order so

PHP code

C# code

Appreciate!



Technology

More From Author