<html>
<head>
<link rel='nofollow' href="https://cdn.syncfusion.com/ej2/material.css" rel="stylesheet" type="text/css" /> -->
<!-- Vue library file -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.min.js" type="text/javascript"></script>
<!-- EJ2 Vue es5 -->
<script src="node_modules/@syncfusion/ej2-vue-es5/scripts/ej2-vue.min.js" type="text/javascript"></script>
</head>
<body>
<div id="Grid">
</body>
<script type="text/javascript">
var data = [
{
OrderID: 10248, CustomerID: 'VINET', EmployeeID: 5, OrderDate: new Date(8364186e5),
ShipName: 'Vins et alcools Chevalier', ShipCity: 'Reims', ShipAddress: '59 rue de l Abbaye',
ShipRegion: 'CJ', ShipPostalCode: '51100', ShipCountry: 'France', Freight: 32.38, Verified: !0
}];
// create a grid by javascript manner
var grid = new ej.grids.Grid({
dataSource: data,
allowPaging: true,
allowGrouping: true,
columns: [
{ field: 'OrderID', headerText: 'Rendelés azonosító', textAlign: 'Right', width: 120, type: 'number' },
{ field: 'Discount', width: 140, headerText: 'Ügyfél-azonosító', type: 'string' }
],
height: 260
});
grid.appendTo('#Grid');
</script>
</html>
|
<html>
<head id="Head1"><title>
GRID DIALOG example
</title>
</head>
<body>
<!-- Begin: master div -->
<div>
<!-- Essentail JS2 for Vue (All components Styles) -->
<link rel='nofollow' href="https://cdn.syncfusion.com/ej2/material.css" rel="stylesheet" type="text/css" />
<style>
.disabled-checkbox {
pointer-events: none;
opacity: 0.5;
}
</style>
<!-- IE polyfill -->
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<!-- Automatically provides/replaces 'Promise' if missing or broken. (for IE) -->
<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js"></script>
<!-- Vue library file-->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.min.js" type="text/javascript"></script>
<!-- Essential JS 2 for Vue global script -->
<script src="https://cdn.syncfusion.com/ej2/ej2-vue-es5/dist/ej2-vue.min.js" type="text/javascript"></script>
<div id="app">
<div style="margin-top: 20px;">
<ejs-grid
id="grdComplianceVerifications"
ref="grdComplianceVerifications"
:data-source='complianceVerificationData'
>
<e-columns>
<e-column field='OrderID' is-primary-key='true' width=100></e-column>
<e-column field='CustomerID' header-text='Customer ID' width=100></e-column>
<e-column field='OrderDate' header-text='Order Date' format='yMd' type='date' width=80></e-column>
<e-column field='ShipName' header-text='ShipName' width=60></e-column>
<e-column field='ShipCountry' header-text='ShipCountry' width=120></e-column>
</e-columns>
</ejs-grid>
</div>
</div>
<script>
Vue.use(ejs.grids.GridPlugin);
const complianceVerificationData = [
{
OrderID: 10248, CustomerID: 'VINET', EmployeeID: 5, OrderDate: new Date(8364186e5),
ShipName: 'Vins et alcools Chevalier', ShipCity: 'Reims', ShipAddress: '59 rue de l Abbaye',
ShipRegion: 'CJ', ShipPostalCode: '51100', ShipCountry: 'France', Freight: 32.38, Verified: !0
}];
let app = new Vue({
el: '#app',
mounted: function() {
console.log('--mounted--');
},
data: function() {
return {
};
},
methods: {
}});
</script>
</div>
<!-- end:master div -->
</body>
</html>
|
<ejs-grid id="grd1" ref="grd1"
:contextMenuItems="contextMenuItems" :allow-Filtering="true" :data-source="mydata" :allow-Sorting="true" //with hypen
@click='alert("qq");' >
<e-columns>
<e-column field="OrderID" is-primary-key="true" width="100"></e-column>
<e-column field="CustomerID" allow-Sorting="true" :allow-Filtering="true" header-text="Customer ID" width="100" ></e-column>
<e-column field="OrderDate" header-text="Order Date" format="yMd" type="date" width="80" ></e-column>
</e-columns>
</ejs-grid> |