Initialize object on page

You can place this JavaScript grid anywhere on your web page, attaching the grid to any object.
Set up grid parameters to determine the look of the grid. Specify whether the grid items will be loaded from XML. dhtmlxGrid uses AJAX for fast and flexible data loading.

</> Source
<!DOCTYPE html>
<html>
<head>
	<title>Initialize object on page</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 myGrid;
		function doOnLoad(){
			myGrid = new dhtmlXGridObject('gridbox');
			myGrid.setImagePath("../../../codebase/imgs/");
			myGrid.setHeader("Column A, Column B");
			myGrid.setInitWidths("100,*");
			myGrid.setColAlign("right,left");
			myGrid.setColTypes("ro,ed");
			myGrid.setColSorting("int,str");
			myGrid.enableMultiselect(true);
			myGrid.init();
			myGrid.load("../common/grid.xml");
		}
	</script>
</head>
<body onload="doOnLoad()">
	<h1>Initialize object on page</h1>
	<p>You can place this JavaScript grid anywhere on your web page, attaching the grid
		to any object.<br>
		Set up grid parameters to determine the look of the grid.
		Specify whether the grid items will be loaded from XML. dhtmlxGrid uses
		AJAX for fast and flexible data loading.</p>
	<div id="gridbox" style="width:350px;height:300px;background-color:white;overflow:hidden"></div>
</body>
</html>

Documentation

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