To get started with ASP.NET Web Forms application, ensure the following software to be installed in the machine.
Syncfusion.EJ2.Javascript
NuGet package to the new application by using the NuGet Package Manager. Right-click the project and select Manage NuGet Packages….
Syncfusion.EJ2.JavaScript
keyword in the Browse tab and install Syncfusion.EJ2.JavaScript NuGet package in the application.
The Syncfuion Javascript NuGet package will be included in the project after the installation process is completed.
~/Site.master
file and add the required styles and script references of Syncfusion JavaScript controls to the <head>
element.<head>
....
....
@* Syncfusion Essential JS 2 Styles *@
<link href="Content/ej2/material.css" rel="stylesheet" />
@* Syncfusion Essential JS 2 Scripts *@
<script src="Scripts/ej2/ej2.min.js"></script>
<script src="Scripts/ej2/datasource.js"></script>
</head>
~/Default.aspx
file and add the Syncfusion JavaScript control to the <div>
element and intiate the Grid control inside the <script>
element.<div class="row">
<h1>Syncfusion JavaScript (ES5) Grid Control</h1>
<br />
<div id="Grid"></div>
<script>
// Initialize Syncfusion JavaScript Grid control
var grid = new ej.grids.Grid({
dataSource: window.inventoryData,
columns: [
{ field: 'Inventor', headerText: 'Inventor Name', width: 140 },
{ field: 'NumberofPatentFamilies', headerText: 'No of Patent Families', width: 185, textAlign: 'Right' },
{ field: 'Country', headerText: 'Country', width: 120 },
{ field: 'Active', headerText: 'Active', width: 130 },
{ field: 'Mainfieldsofinvention', headerText: 'Main fields of invention', width: 180 },
],
allowSorting: true,
allowPaging: true,
pageSettings: { pageSize: 15 }
});
grid.appendTo('#Grid');
</script>
</div>