vue-datagrid icon indicating copy to clipboard operation
vue-datagrid copied to clipboard

How to get values of selected cells?

Open datainvestor opened this issue 4 years ago • 1 comments

I am having issues with how events working in vue-datagrid. Based on API and demos I have been trying to access event from beforeCellFocus method but not really working. Here is my codesandbox: https://codesandbox.io/s/revolist-forked-6c3j9?file=/src/App.vue

So basically I am trying to get values of all cells but instead using my approach I only get first one that got focused, so like from all the cells I can select only one is picked, which is not what I want. Any idea how to get all the cell values?

datainvestor avatar Sep 30 '21 10:09 datainvestor

There is now a .getSelectedRange() method which is not in the documentation but has been merged. It returns the coordinates of the currently selected range and then you can find the data from the your data-source.

alinoil avatar Jun 30 '22 14:06 alinoil