Drag-and-drop between Lists



</> Source
<!DOCTYPE html>
<html>
<head>
	<title>Drag-and-drop between Lists</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<link rel="stylesheet" type="text/css" href="../common/demo_style.css"/>
	<style>
		body {
			-webkit-user-select:none;
			-moz-user-select:none;
			user-select:none;
		}
	</style>
	<script>
		var myList1, myList2;
		function doOnLoad() {
			myList1 = new dhtmlXList({
				container:"data_container1",
				template:"<span class='dhx_strong'>#name#</span>#address# <br/><span class='dhx_light'>#city#</span>",
				type:{ height: 80 },
				drag:true
			});
			myList1.load("../common/list.xml");
			myList2 = new dhtmlXList({
				container:"data_container2",
				template:"<span class='dhx_strong'>#name#</span>#address# <br/><span class='dhx_light'>#city#</span>",
				type:{ height: 80 },
				drag:true
			});
			myList2.add({
				name:"Drop here",
				address:"0.1",
				city:"dhtmlx"
			});
		}
	</script>
</head>
<body onload="doOnLoad();">
	<h1>Drag-and-drop between Lists</h1>
	<table border="0" cellspacing="5" cellpadding="5">
		<tr>
			<td>
				<div id="data_container1" class="list_demo_samples"></div><br>
			</td>
			<td>
			</td>
			<td>
				<div id="data_container2" class="list_demo_samples"></div><br>
			</td>
		</tr>
	</table>
</body>
</html>

Documentation

Check documentation to learn how to use the components and easily implement them in your applications.