Maximize productivity with
30% off* for a limited time
using BOOSTDEV30.
Includes 3- and 5-packs.
*Some exclusions may apply.New Product LaunchBoldDesk: Help desk ticketing software starts at $10 for 3 agents.
Try it for free.
new Vue({
el: '#app',
template: `
<div id="app">
<ejs-grid id="Grid" ref="grid" :dataSource="data" :selectionSettings="selection" :toolbar='toolbar' :toolbarClick='clickHandler' height='315px'>
<e-columns>
<e-column field='OrderID' headerText='Order ID' isPrimaryKey='true' textAlign='Right' width=90></e-column>
. . .
</e-columns>
</ejs-grid>
</div>
`,
data() {
return {
data: data.slice(0,20),
selection:{type:'Multiple'},
toolbar: [{ text: 'Row Info', tooltipText: 'Row Info', id: 'rowinfo' }],
};
},
methods: {
clickHandler: function(args) {
if (args.item.id === 'rowinfo') {
console.log(this.$refs.grid.ej2Instances.getSelectedRows());
console.log(this.$refs.grid.ej2Instances.getSelectedRecords());
}
}
},
provide: {
grid: [Toolbar,Page]
}
}); |