revogrid icon indicating copy to clipboard operation
revogrid copied to clipboard

How to programmatically sort the grid?

Open bbbford opened this issue 3 years ago • 1 comments

I would like to save the sort order of my grid, so that I can display it the same way when the user returns.

I attempt to get the sorting order via the "beforesorting" event. This event gives me column name, order, prop.

I would later like to apply this same sorting order to the grid. I attempt to use the "updateColumnSorting" method. This method takes a column index, which is not provided, so I attempt to find the column index.

I call the "updateColumnSorting" method, which correctly shows the sort indicator, but the data in the grid is not actually sorted.

How can I programmatically sort the grid?

Here is sandbox link - https://codesandbox.io/s/revogrid-programmatic-sort-z4yn9i?file=/src/Grid.vue

bbbford avatar May 12 '22 18:05 bbbford

@revolist Any insights here?

Yiidiir avatar Feb 16 '23 02:02 Yiidiir