<template>
<div id="app">
<ejs-grid :dataSource='data' height='315'>
<e-columns>
<e-column field='OrderID' headerText='Order ID' textAlign='Right' width=100></e-column>
<e-column field='CustomerID' headerText='Customer ID' width=120></e-column>
<e-column field='Freight' headerText='Freight' textAlign= 'Right' width=120 format= 'C2'></e-column>
<e-column field='ShipCountry' headerText='Ship Country' width=150></e-column>
<e-column field='ShippedDate' headerText='Shipped Date' width=150></e-column>
<e-column field='Verified' headerText='Verified' displayAsCheckBox='true' width=150></e-column>
</e-columns>
</ejs-grid>
</div>
</template>
|
App.vue
<ejs-grid
:dataSource="data"
:allowPaging="true"
:pageSettings="pageSettings"
:editSettings="editSettings"
:toolbar="toolbar"
>
<e-columns>
<e-column
field="OrderID"
headerText="Order ID"
width="120"
textAlign="Right"
:isPrimaryKey="true"
></e-column>
<e-column
field="Verified"
headerText="Verified"
width="100"
editType="booleanedit"
displayAsCheckBox="true"
type="boolean"
textAlign="Center"
></e-column>
</e-columns>
</ejs-grid>
. . .
export default Vue.extend({
data: () => {
return {
data: data.slice(0),
editSettings: {
allowEditing: true,
allowAdding: true,
allowDeleting: true
},
toolbar: ["Add", "Edit", "Delete"],
pageSettings: { pageCount: 5 }
};
}, |