DataView with context menu

</> Source
<!DOCTYPE html>
<html>
<head>
	<title>DataView with context menu</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>
	<style>
		html, body {
			height:100%;
		};
	</style>
	<script>
		var myContextMenu, myDataView;
		function doOnLoad() {
			myContextMenu = new dhtmlXMenuObject("contextArea");
			myContextMenu.setIconsPath("../common/menu/");
			myContextMenu.renderAsContextMenu();
			myContextMenu.loadStruct("../common/dhxmenu.xml");
			myDataView = new dhtmlXDataView({
				container:"data_here",
				type:{
					template:"#Package# : #Version#<br/>#Maintainer#",
					padding:5,
					height:50
				},
				x_count:3
			});
			myDataView.attachEvent("onBeforeContextMenu",function(id,e){
				myContextMenu._doOnContextBeforeCall(e,{id:id});
				myDataView.select(id);
				return 	false;
			});
			myDataView.load("../common/data.xml");
		}
	</script>
</head>
<body onload="doOnLoad();">
	<h1>DataView with context menu</h1>
	<div id="data_here" style="height:400px"></div>
</body>
</html>

Documentation

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