Custom group format
There is an opportunity to define the group format
</> Source
<!DOCTYPE html>
<!--pro-->
<html>
<head>
<title>Custom group format</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("80,150,120,75,75,75,75,100");
myGrid.setColAlign("right,left,left,right,center,left,center,center");
myGrid.setColTypes("dyn,edtxt,ed,price,ch,co,ra,ro");
myGrid.setColSorting("na,str,str,int,int,int,na,na");
myGrid.customGroupFormat=function(text,count){
return "Grouped by "+text+", there are "+count+" related records"
};
myGrid.enableAutoWidth(true);
myGrid.init();
myGrid.load("../common/grid.xml",function(){
myGrid.groupBy(2);
});
}
</script>
</head>
<body onload="doOnLoad()">
<h1>Custom group format</h1>
<p>There is an opportunity to define the group format</p>
<div id="gridbox" style="width:750px;height:350px;overflow:hidden"></div>
</body>
</html>
Documentation
Check documentation to learn how to use the components and easily implement them in your applications.