You can use Web page or browser-based scripting, using JavaScript, to dynamically control the behavior and appearance of an i5Grid in SAP Manufacturing Integration and Intelligence (SAP MII). You can use scripting to change i5Gird properties, call i5Grid methods, and to use i5Grid events
The HTML snippet to build a Web page is as follows:
Syntax
<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE>Your Title Here---</TITLE>
<META http-equiv="X-UA-Compatible" content="IE=edge">
<META HTTP-EQUIV='Expires' CONTENT='-0'>
<meta http-equiv='pragma' content='no-cache'>
<SCRIPT type="text/javascript" src=="/XMII/JavaScript/bootstrap.js" data-libs="i5Chart,i5Grid">
</SCRIPT>
<SCRIPT>
var i5Grid_Applet = new com.sap.xmii.grid.init.i5Grid(<Displaytemplatename>, <Querytemplatename>);
i5Grid_Applet.setGridWidth("640px");
i5Grid_Applet.setGridHeight("400px");
i5Grid_Applet.draw("myDiv");
</script>
<body>
<div id="myDiv"></div>
</body>
</HTML>
The following HTML snippet describes the behavior of the i5Grids based on the parameters:
Syntax
var c = new com.sap.xmii.grid.init.i5Grid(display template name, query template name, template properties);
c.draw ('div');
Example
var c = new com.sap.xmii.grid.init.i5Grid('i061926/test','Demo/testTagQuery');
The parameters, display template name and query template name are mandatory while template properties are optional. The grid will not be displayed if you provide only the display template name.