Columns' hiding using header menu

Try to right click on any header. And you will see the menu where columns can be hidden by checking checkboxes.

</> Source
<!DOCTYPE html>
<!--pro-->
<html>
<head>
	<title>Columns' hiding using header 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>
		.dhx_header_cmenu{
			background-color:#ffffff;
			border:2px outset silver;
			z-index:2;
		}
		.dhx_header_cmenu_item{
			white-space:nowrap;
		}

	</style>
	<script>
		var myGrid;
		function doOnLoad(){
			myGrid = new dhtmlXGridObject('gridbox');
			myGrid.setImagePath("../../../codebase/imgs/");
			myGrid.setHeader("Sales,Book Title,Author,Price,In Store,Shipping,Bestseller,Date of Publication");
			myGrid.setInitWidths("80,150,120,80,80,80,80,100");
			myGrid.setColAlign("right,left,left,right,center,left,center,center");
			myGrid.setColTypes("dyn,edtxt,ed,price,ch,co,ra,ro");
			myGrid.init();
			myGrid.enableHeaderMenu();
			myGrid.setColumnHidden(2,true);
			myGrid.enableAutoWidth(true);
			myGrid.enableAutoHeight(true);
			myGrid.load("../common/grid_16_rows_columns_manipulations.xml");
		}
	</script>
</head>
<body onload="doOnLoad()">
	<h1>Columns' hiding using header menu</h1>
	<p>Try to right click on any header. And you will see the menu where columns can be hidden by checking checkboxes.</p>
	<table width="600px">
		<tr>
			<td>
				<div id="gridbox" style="width:100%;height:350px;background-color:white;"></div>
			</td>
		</tr>
	</table>
</body>
</html>

Documentation

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