Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146104 | Jul 19,2019 06:03 PM UTC | Jul 24,2019 09:06 PM UTC | Vue | 4 |
![]() |
Tags: Data Grid |
<template>
<div id="app">
<ejs-grid id="Grid"
ref="grid"
:dataSource="data"
:editSettings="editSettings"
:allowPaging="true"
:toolbar="toolbar"
>
<e-columns>
<e-column field="OrderID" headerText="Order ID" isPrimaryKey="true" width="90"></e-column>
<e-column field="CustomerID" headerText="Customer ID" width="120"></e-column>
<e-column field="Freight"
headerText="Freight"
editType="numericedit"
:validationRules="customerIDRules"
type="number"
width="90"></e-column>
<e-column field="ShipCountry" headerText="Ship Country" width="120"></e-column>
</e-columns>
</ejs-grid>
</div>
</template>
<script>
import Vue from "vue";
import { GridPlugin, Page, Toolbar, Edit } from "@syncfusion/ej2-vue-grids";
import { DropDownListPlugin } from "@syncfusion/ej2-vue-dropdowns";
import { DropDownButtonPlugin } from "@syncfusion/ej2-vue-splitbuttons";
import { ButtonPlugin } from "@syncfusion/ej2-vue-buttons";
import { data } from "./datasource";
Vue.use(GridPlugin);
Vue.use(ButtonPlugin);
Vue.use(DropDownListPlugin);
Vue.use(DropDownButtonPlugin);
export default {
data() {
return {
waterMark: "Select a export option",
height: "220px",
data: data,
editSettings: {
allowEditing: true,
allowAdding: true,
allowDeleting: true
},
toolbar: ["Add", "Edit", "Delete", "Update", "Cancel"],
customerIDRules: { required: true, min: 0, max: 1000 }
};
},
provide: {
grid: [Page, Toolbar, Edit]
},
methods: {}
};
</script>
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.