Reordering on grouped columns in Vue Grid component

16 Mar 20232 minutes to read

Grid provides an option to interchange the position of the Grouped Columns by dragging and dropping the grouped headercells in the droparea. So, any new column entering into the droparea can also be dropped in any position.

To enable this feature, you have to set the groupSettings.allowReordering property as true.

    <div id="app">
        <ejs-grid ref='grid' :dataSource='data' :allowGrouping='true' :groupSettings='groupSettings' height='240px'>
                <e-column field='OrderID' headerText='Order ID' textAlign='Right' width=120></e-column>
                <e-column field='CustomerID' headerText='Customer ID' width=150></e-column>
                <e-column field='ShipCity' headerText='Ship City' width=150></e-column>
                <e-column field='ShipName' headerText='Ship Name' width=150></e-column>
import Vue from "vue";
import { GridPlugin, Group } from "@syncfusion/ej2-vue-grids";
import { data } from './datasource.js';


export default {
  data() {
    return {
      data: data,
      groupSettings: { columns: ['CustomerID'], allowReordering: true }
  methods: { },
  provide: {
    grid: [Group]
 @import "../node_modules/@syncfusion/ej2-vue-grids/styles/material.css";