Skip to content

Event or API for detecting and saving reordered columns #793

@TaronMinasyan

Description

@TaronMinasyan

Description

Currently, I’m using RevoGrid with canMoveColumns enabled to allow column reordering.
The drag & drop reordering works visually, but I can’t find a clear way to detect when the order has changed
and then save the new column order (e.g., to user settings or local storage).

I’ve tried listening to related events like:

@columnorderchanged @beforecolumndragend @afteredit
and even adding custom listeners on the grid element,
but none seem to reliably fire after the columns are reordered in the UI.

<v-grid ref="revoGrid" :columns="columns" v-model:source="dataSource" :plugins="plugins" canMoveColumns :resize="true" @afteredit="handleAfterEdit" @pagechange="handlePageChange" />
Using version:

"@revolist/revogrid": "^4.17.0",
"@revolist/vue3-datagrid": "^4.17.0"

What I’m trying to do

I want to:

  1. Detect when a user reorders columns via drag and drop.
  2. Get the new column order (columns array in new order).
  3. Save it to user settings or local storage.
  4. Reapply it next time the grid is opened.

Something like:

revoGrid.addEventListener('afterColumnReorder', (e) => { const newOrder = e.detail.columns; saveUserSettings(newOrder); });

Expected Behavior:

RevoGrid should fire an event after a successful column reorder
with the updated column sequence so we can persist it.

Actual Behavior

No official event fires after reordering is completed.
It’s unclear how to hook into column drag/drop completion in a stable way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions