Attach Grid to Form / Container

</> Source
<!DOCTYPE html>
<html>
<head>
	<title>Attach Grid to Form / Container</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>
	<script>
		var myForm, formData, myGrid;
		function doOnLoad() {
			formData = [
				{type: "settings", labelWidth: 130, inputWidth: 170},
				{type: "input", label: "Full Name", value: "Kaapori Lumikaastra"},
				{type: "input", label: "Email", value: "kaapori.lumi@gmail.com"},
				{type: "container", name: "myGrid", label: "Select Product", inputWidth: 330, inputHeight: 200}
			];
			myForm = new dhtmlXForm("myForm", formData);

			myGrid = new dhtmlXGridObject(myForm.getContainer("myGrid"));
			;
			myGrid.setImagePath("../../../codebase/imgs/");
			myGrid.load("../common/grid.xml");

			// enabled/disabled mode see in 04_events/09_container_events.html
			myGrid.attachEvent("onEditCell", function(){return false;});

		}
	</script>
</head>
<body onload="doOnLoad();">
	<div id="myForm"></div>
</body>
</html>

Documentation

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