<template>
<div class="col-lg-12 control-section">
<div>
<ejs-grid :dataSource="data" :allowPaging="true" :pageSettings='pageSettings' :toolbar='toolbar'>
<e-columns>
<e-column field='CategoryName' headerText='Category Name' width='150'></e-column>
<e-column field='ProductName' headerText='Product Name' width='150'></e-column>
</e-columns>
</ejs-grid>
</div>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import { GridPlugin, Page, Toolbar } from "@syncfusion/ej2-vue-grids";
import { categoryData } from "./data-source";
Vue.use(GridPlugin);
export default Vue.extend({
data: () => {
return {
data: categoryData,
pageSettings: { pageCount: 5 },
toolbar: ["Search"]
};
},
provide: {
grid: [Page, Toolbar]
}
});
</script> |