Hi,
Thanks for adding Vue3 support but your documentation and demos are still in vue2 which is quite confusing. like the below docs
and demo
https://ej2.syncfusion.com/vue/documentation/grid/edit/#command-column
I'm trying to use it in Vue3 but command columns are not appearing. When you'll be updating the docs to add Vue3 code snippets?
Thanks.
<template>
<div id="app">
<ejs-grid :dataSource='data' :editSettings='editSettings' :allowPaging="true">
<e-columns>
<e-column field='CustomerID' :isPrimaryKey='true' width='125' textAlign='Right'></e-column>
<e-column field='OrderID' width='125' textAlign='Right'></e-column>
<e-column field='ShipCountry' width='125' textAlign='Right'></e-column>
<e-column headerText='Commands' width=120 :commands='commands'></e-column>
</e-columns>
</ejs-grid>
</div>
</template>
<script>
import { GridComponent, ColumnsDirective, ColumnDirective,Edit, Page, CommandColumn } from '@syncfusion/ej2-vue-grids';
export default {
name: 'App',
components: {
'ejs-grid' : GridComponent,
'e-columns' : ColumnsDirective,
'e-column' : ColumnDirective
},
data() {
return {
data: [
{
"OrderID":10248,
"CustomerID":"VINET",
"ShipCountry":"France"
},
{
"OrderID":10249,
"CustomerID":"TOMSP",
"ShipCountry":"Germany"
}],
commands: [{ type: 'Edit', buttonOption: { cssClass: 'e-flat', iconCss: 'e-edit e-icons' } },
{ type: 'Delete', buttonOption: { cssClass: 'e-flat', iconCss: 'e-delete e-icons' } },
{ type: 'Save', buttonOption: { cssClass: 'e-flat', iconCss: 'e-update e-icons' } },
{ type: 'Cancel', buttonOption: { cssClass: 'e-flat', iconCss: 'e-cancel-icon e-icons' } }],
editSettings: { allowEditing: true, allowDeleting: true },
columns: [
{ field: "OrderID", headerText: "OrderID", width: "120" },
{ field: "CustomerID", headerText: "Customer ID", width: "120" },
]
};
},
// module injection
provide: {
grid: [Page,Edit, CommandColumn],
}
};
</script>
<style>
@import '../node_modules/@syncfusion/ej2-base/styles/material.css';
@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css';
@import '../node_modules/@syncfusion/ej2-calendars/styles/material.css';
@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css';
@import '../node_modules/@syncfusion/ej2-inputs/styles/material.css';
@import '../node_modules/@syncfusion/ej2-navigations/styles/material.css';
@import '../node_modules/@syncfusion/ej2-popups/styles/material.css';
@import '../node_modules/@syncfusion/ej2-splitbuttons/styles/material.css';
</style> |
Hi Jesus,
Thanks for the quick reply with a working example. I'll check the solution today.
Bests,
Waleed
Hi Jesus,
I've checked your solution. It is working fine when we use the command column in the `App.vue` and not working when I put the exact code into the component and use that component in the App.vue.
Is there anything I'm missing? attached is the zip file for your reference.
Thanks.
Attachment: Vue3gridcommandcolumninchildcomponent_dfe45a87.zip
Hi Jesus,
Thanks for the reply.
When I try to download the sample, I'm getting an Access Denied error. This only happens to your last sample, not the other ones (as I
can download them). Kindly check the permissions so I can check the workaround and use it until your team fixes the issue.
Bests,
Waleed.
Hi Jesus.
I can now download the samples files.
Bests,
Waleed
Hi Jesus,
Thanks for the reply. We are waiting for the release.
Bests,
Waleed