Install RealGrid2 with Script tag
You can initialize RealGrid2 by adding the necessary tags directly to the head
of your HTML page. This method is simple because you don't have to worry about a build system like in traditional web development.
However, it is difficult to maintain because you have to manually check whether all dependent files are included through script tags. If you need advanced features, check out Using RealGrid2 with ES6 build system.
To initialize RealGrid2 using the <script>
tag, unzip the file downloaded from the License and How to Download RealGrid2 document and enter the src of the <script>
tag. Include a link to the location of the file in the properties.
<link href="/public/realgrid-2.0.0/realgrid-style.css" rel="stylesheet" />
<script src="/public/realgrid-2.0.0/realgrid-lic.js"></script>
<script src="/public/realgrid-2.0.0/realgrid.2.0.0.min.js"></script>
<style>
#realgrid {
width: 100%;
height: 440px;
}
</style>
<script>
const realGrid2Lic = 'upVcPE........';
document.addEventListener('DOMContentLoaded', function () {
const container = document.getElementById('realgrid');
const provider = new RealGrid.LocalDataProvider(false);
const gridView = new RealGrid.GridView(container);
gridView.setDataSource(provider);
});
</script>
<body>
<div id="realgrid"></div>
</body>
License variable "realGrid2Lic"
The license issued to use RalGrid2 can be passed to RealGrid through a variable. [How to download license and RealGrid2] You can enter the license file downloaded from (/tutorial/realgrid-license) as a <script>
tag in HTML, but assign it to the "realGrid2Lic" variable as in the example code above. There is also a way to deliver it.