Custom output with math calculations

As you could see in the previous sample, you are allowed to calculate cells values automatically by math formulas. Moreover you have a possibility to customize cells applying any custom cells types.

</> Source
<!DOCTYPE html>
<!--pro-->
<html>
<head>
	<title>Custom output with math calculations</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("Book Title,Author,Price,Quantity,Total");
			myGrid.setInitWidths("150,120,80,80,80");
			myGrid.setColAlign("left,left,right,right,right");
			myGrid.setColTypes("ed,ed,price,ed,price[=c2*c3]");
			myGrid.setColSorting("str,str,int,int,int");
			myGrid.setMathRound(2);
			myGrid.enableAutoWidth(true);
			myGrid.enableAutoHeight(true);
			myGrid.init();
			myGrid.load("../common/grid_math2.xml");
		}
	</script>
</head>
<body onload="doOnLoad()">
	<h1>Custom output with math calculations</h1>
	<p> As you could see in the previous sample, you are allowed to calculate cells values automatically by math formulas. Moreover you have a possibility to customize cells applying any custom cells types.</p>
	<div id="gridbox" style="width:600px;height:450px;background-color:white;"></div>
</body>
</html>

Documentation

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