Function documentationWeb Page Scripting for i5Grids Locate this document in the navigation structure

 

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

Features

The HTML snippet to build a Web page is as follows:

Syntax Syntax

  1. <!DOCTYPE HTML>
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Your Title Here---</TITLE>
  5. <META http-equiv="X-UA-Compatible" content="IE=edge">
  6. <META HTTP-EQUIV='Expires' CONTENT='-0'>
  7. <meta http-equiv='pragma' content='no-cache'>
  8. <SCRIPT type="text/javascript" src=="/XMII/JavaScript/bootstrap.js" data-libs="i5Chart,i5Grid">
  9. </SCRIPT>
  10. <SCRIPT>
  11. var i5Grid_Applet = new com.sap.xmii.grid.init.i5Grid(<Displaytemplatename>, <Querytemplatename>);
    
  12. i5Grid_Applet.setGridWidth("640px");
  13. i5Grid_Applet.setGridHeight("400px");
  14. i5Grid_Applet.draw("myDiv");
  15. </script>
  16. <body>
  17. <div id="myDiv"></div>
  18. </body>
  19. </HTML>
End of the code.

The following HTML snippet describes the behavior of the i5Grids based on the parameters:

Syntax Syntax

  1. var c = new  com.sap.xmii.grid.init.i5Grid(display template name, query template name, template properties);
  2. c.draw ('div');
End of the code.

Example Example

var c = new com.sap.xmii.grid.init.i5Grid('i061926/test','Demo/testTagQuery');

End of the example.

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.

More Information

i5Grid Methods