Autowidth for column(s)

Using * symbol instead of column width, you can set auto width in the grid.
Try to resize column. Book Title column will take all available space after resizing other columns.

</> Source
<!DOCTYPE html>
<html>
<head>
	<title>Autowidth for column(s)</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("Sales,Book Title,Author,Price,In Store,Shipping,Bestseller,Date of Publication");
			myGrid.setInitWidths("50,*,120,80,70,80,70,100");
			myGrid.setColAlign("center,left,left,right,center,left,center,center");
			myGrid.setColTypes("dyn,ed,ed,price,ch,co,ra,ro");
			myGrid.setColSorting("int,str,str,int,str,str,str,date");
			myGrid.enableMultiselect(true);
			myGrid.init();
			myGrid.load("../common/grid.xml");
		}
	</script>
</head>
<body onload="doOnLoad()">
	<h1>Autowidth for column(s)</h1>
	<p>Using * symbol instead of column width, you can set auto width in the grid. <br>
		Try to resize column. Book Title column will take all available space after resizing other columns.</p>
	<div id="gridbox" style="width:700px; height:320px; 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.