Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
147456 | Sep 11,2019 10:13 AM UTC | Sep 12,2019 07:30 AM UTC | Vue | 1 |
![]() |
Tags: Data Grid |
App.vue
<template>
<div class="col-lg-12 control-section">
<ejs-grid
ref="grid"
id="grid"
:dataSource="data"
:allowPaging="true"
:pageSettings="pageSettings"
>
<e-columns>
<e-column
field="OrderID"
headerText="Order ID"
width="120"
textAlign="Right"
:isPrimaryKey="true"
></e-column>
<e-column
field="Freight"
headerText="Freight"
width="120"
:format="{format:'C2', currency:'CHF' }"
textAlign="Right"
:isPrimaryKey="true"
></e-column>
<e-column field="ShipCountry" headerText="Ship Country" width="150"></e-column>
</e-columns>
</ejs-grid>
</div>
</template>
<script>
import Vue from "vue";
import { GridPlugin, Page } from "@syncfusion/ej2-vue-grids";
import { data } from "./data";
// refer the corresponding json files and load them using loadCldr method
import { loadCldr, setCulture, setCurrencyCode } from "@syncfusion/ej2-base";
import * as currencies from "./currencies.json";
import * as gregorian from "./ca-gregorian.json";
import * as numbers from "./numbers.json";
loadCldr(currencies, gregorian, numbers);
setCulture("sw");
setCurrencyCode("CHF");
Vue.use(GridPlugin);
export default Vue.extend({
data: () => {
return {
data: data.slice(0, 20),
pageSettings: { pageCount: 5 }
};
},
methods: {},
computed: {},
provide: {
grid: [Page]
}
});
</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.