|
App.component.html
<div class="control-section">
<div class="div-button">
<button ejs-button (click)="onClick($event)" cssClass="e-info">
Load 100K Data
</button>
<span id="popup">
<span id="gif" class="image"></span>
</span>
</div>
<ejs-grid
#grid
[dataSource]="vData"
[enableInfiniteScrolling]="true"
height="400"
[pageSettings]="pageSettings"
>
<e-columns>
<e-column type="checkbox" width="120"></e-column>
<e-column field="FIELD1" headerText="Player Name" width="120"></e-column>
<e-column field="FIELD2" headerText="Year" width="100"></e-column>
<e-column field="FIELD3" headerText="Stint" width="120"></e-column>
<e-column field="FIELD4" headerText="TMID" width="120"></e-column>
<e-column field="FIELD5" headerText="LGID" width="120"></e-column>
<e-column field="FIELD6" headerText="GP" width="120"></e-column>
<e-column field="FIELD7" headerText="GS" width="120"></e-column>
</e-columns>
</ejs-grid>
</div> |
|
App.vue
<template>
<div id="app">
<button v-on:click="loadData">LoadData</button>
<ejs-grid
ref="gridObj"
height="150px"
:enableInfiniteScrolling="true"
:pageSettings="pageSettings"
:load="load"
>
<e-columns>
<e-column type="checkbox" width="80"></e-column>
<e-column
field="OrderID"
headerText="ID"
width="80"
isPrimaryKey="true"
></e-column>
<e-column
field="CustomerID"
headerText="CustomerID"
width="90"
></e-column>
<e-column field="ShipCity" headerText="ShipCity" width="120"></e-column>
</e-columns>
</ejs-grid>
</div>
</template>
<script>
import Vue from "vue";
import axios from "axios";
import { data } from "./datasource.js";
import {
GridPlugin,
Freeze,
Edit,
Toolbar,
Page,
Filter,
ColumnChooser,
InfiniteScroll,
} from "@syncfusion/ej2-vue-grids";
import { ButtonPlugin } from "@syncfusion/ej2-vue-buttons";
Vue.use(ButtonPlugin);
Vue.use(GridPlugin);
export default {
data() {
return {
data: data,
pageSettings: {
pageSize: 8,
},
};
},
methods: {
load: function () {},
loadData() {
debugger;
this.$refs.gridObj.dataSource = this.data;
},
},
provide: {
grid: [Freeze, InfiniteScroll, Edit, Toolbar, Page, Filter, ColumnChooser],
},
};
</script>
<style>
</style>
|